This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('woo_discount_rules_load_minimum_product_variant_price_method')){ | |
function woo_discount_rules_load_minimum_product_variant_price_method($load_min_price, $product){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_load_minimum_product_variant_price', 'woo_discount_rules_load_minimum_product_variant_price_method', 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('woo_discount_rules_has_price_override', '__return_true'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* List matched Rules in Table format | |
* | |
* This template can be overridden by copying it to yourtheme/plugin-folder-name/discount-table.php | |
*/ | |
if (!defined('ABSPATH')) exit; // Exit if accessed directly | |
if (!isset($table_data) || empty($table_data)) return false; | |
$base_config = (is_string($data)) ? json_decode($data, true) : (is_array($data) ? $data : array()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('woo_discount_rules_remove_event_woocommerce_before_calculate_totals_method')){ | |
function woo_discount_rules_remove_event_woocommerce_before_calculate_totals_method($remove_event){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_remove_event_woocommerce_before_calculate_totals', 'woo_discount_rules_remove_event_woocommerce_before_calculate_totals_method'); | |
if(!function_exists('woo_discount_rules_has_price_override_method')){ | |
function woo_discount_rules_has_price_override_method($hasPriceOverride, $product){ | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woocommerce_before_mini_cart', function (){ | |
if (!WC()->cart->is_empty()){ | |
WC()->cart->calculate_totals(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('woo_email_customizer_auto_fix_empty_tags_method')){ | |
function woo_email_customizer_auto_fix_empty_tags_method($auto_fix_empty_tags){ | |
return true; | |
} | |
} | |
add_filter('woo_email_customizer_auto_fix_empty_tags', 'woo_email_customizer_auto_fix_empty_tags_method', 10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom code shortcode | |
* | |
* This template can be overridden by copying it to yourtheme/plugin-folder-name/woo_mail/custom_code.php. | |
* @var $order WooCommerce order | |
* @var $email_id WooCommerce email id (new_order, cancelled_order) | |
* @var $sent_to_admin WooCommerce email send to admin | |
* @var $plain_text WooCommerce email format | |
* @var $email WooCommerce email object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('woo_discount_rules_price_strikeout_before_discount_price_method')){ | |
function woo_discount_rules_price_strikeout_before_discount_price_method($item_price, $product){ | |
$regular_price = $product->get_regular_price(); | |
$item_price = wc_price($regular_price).$product->get_price_suffix(); | |
return $item_price; | |
} | |
} | |
add_filter('woo_discount_rules_price_strikeout_before_discount_price', 'woo_discount_rules_price_strikeout_before_discount_price_method', 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('woo_email_customizer_enable_new_user_notification_method')){ | |
function woo_email_customizer_enable_new_user_notification_method($allow, $user_id){ | |
return false; | |
} | |
} | |
add_filter('woo_email_customizer_enable_new_user_notification_method', 'woo_email_customizer_enable_new_user_notification_method', 10, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('woo_discount_rules_trigger_applied_coupon_before_load_cart_method')){ | |
function woo_discount_rules_trigger_applied_coupon_before_load_cart_method($load_before_cart){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_trigger_applied_coupon_before_load_cart', 'woo_discount_rules_trigger_applied_coupon_before_load_cart_method', 10); |