- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
662 B
PHP
Executable File
34 lines
662 B
PHP
Executable File
<?php
|
|
|
|
/**
|
|
* Bonanza
|
|
* https://wordpress.org/plugins/bonanza-woocommerce-free-gifts-lite/
|
|
*/
|
|
if ( ! class_exists( 'BWFAN_Compatibility_With_Bonanza' ) ) {
|
|
class BWFAN_Compatibility_With_Bonanza {
|
|
|
|
public function __construct() {
|
|
add_filter( 'bwfan_exclude_cart_items_to_restore', [ $this, 'exclude_gifts' ], 99, 3 );
|
|
}
|
|
|
|
/**
|
|
* Excluding restoring gift products
|
|
*
|
|
* @param $bool
|
|
* @param $key
|
|
* @param $data
|
|
*
|
|
* @return bool|mixed
|
|
*/
|
|
public function exclude_gifts( $bool, $key, $data ) {
|
|
if ( isset( $data['xlwcfg_gift_id'] ) ) {
|
|
$bool = true;
|
|
}
|
|
|
|
return $bool;
|
|
}
|
|
}
|
|
|
|
new BWFAN_Compatibility_With_Bonanza();
|
|
}
|