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('woocommerce_coupon_message', function ($msg, $msg_code, $coupon){ | |
if(!empty($coupon)){ | |
if(method_exists($coupon, 'get_code')){ | |
$applicable_coupons = array('blackfridaysale'); //COUPON | |
$coupon_code = $coupon->get_code(); //Applied COUPON | |
//DO THE PROCESS FOR CHECKING THE CONDITION MATCHES OR NOT | |
if(in_array($coupon_code, $applicable_coupons)){ | |
$msg = ''; //YOU CAN CUSTOMIZE THE MESSAGE HERE | |
} | |
} |
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('advanced_woo_discount_rules_discount_prices_of_product', function ($discount_prices, $product, $quantity, $cart_item){ | |
//FOR CHANGING DISCOUNTED_PRICE you can change it in $discount_prices['discounted_price'] | |
$discount_prices['discounted_price'] = wc_round_discount($discount_prices['discounted_price'], 2); | |
return $discount_prices; | |
}, 10, 4); |
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('advanced_woo_discount_rules_notice_on_remove_coupon_while_having_a_discount', function ($msg, $coupon_code){ | |
$msg = 'The product(s) in your shopping basket are already discounted up to 15% or more than the value of your Coupon code "'.$coupon_code.'". The Coupon code discount is therefore already applied.'; //YOU CAN CUSTOMIZE THE MESSAGE HERE | |
return $msg; | |
}, 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('woocommerce_coupon_message', function ($msg, $msg_code, $coupon){ | |
if(!empty($coupon)){ | |
if(method_exists($coupon, 'get_code')){ | |
$coupon_code = $coupon->get_code(); //Applied COUPON | |
//DO THE PROCESS FOR CHECKING THE CONDITION MATCHES OR NOT | |
if($coupon_code == 'FREENEONGOBY' || $coupon_code == 'freeneongoby'){ | |
$msg = ''; //YOU CAN CUSTOMIZE THE MESSAGE HERE | |
} | |
} | |
} |
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
<div class="email-product-list" style="padding: 15px 25px;"> | |
<?php | |
/** | |
* Order details table shown in emails. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). | |
* will need to copy the new files to your theme to maintain compatibility. We try to do this. | |
* as little as possible, but it does happen. When this occurs the version of the template file will. | |
* be bumped and the readme will list any important changes. |
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
<div class="email-product-list" style="padding: 15px 25px;"> | |
<?php | |
/** | |
* Order details table shown in emails. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer). | |
* will need to copy the new files to your theme to maintain compatibility. We try to do this. | |
* as little as possible, but it does happen. When this occurs the version of the template file will. | |
* be bumped and the readme will list any important changes. | |
*/ |
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
function woo_discount_rules_discount_amount_before_apply_method($discount_amount){ | |
$discount_amount = wc_round_discount($discount_amount, 1); | |
return $discount_amount; | |
} | |
add_filter('woo_discount_rules_discount_amount_before_apply', 'woo_discount_rules_discount_amount_before_apply_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
if(!function_exists('woo_discount_rules_has_price_override_method')){ | |
function woo_discount_rules_has_price_override_method($has_price_override, $product, $on_apply_discount){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_has_price_override', 'woo_discount_rules_has_price_override_method', 10, 3); | |
function woo_discount_rules_price_rule_final_amount_applied_method($discountedPrice, $price, $discount, $additionalDetails, $product, $product_page){ | |
if($discountedPrice < 0) $discountedPrice = 0; | |
$total_price = $product->get_price(); |
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_has_price_override_method')){ | |
function woo_discount_rules_has_price_override_method($has_price_override, $product, $on_apply_discount){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_has_price_override', 'woo_discount_rules_has_price_override_method', 10, 3); | |
function woo_discount_rules_price_rule_final_amount_applied_method($discountedPrice, $price, $discount, $additionalDetails, $product, $product_page){ | |
if($discountedPrice < 0) $discountedPrice = 0; | |
$total_price = $product->get_price(); |
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_has_price_override_method')){ | |
function woo_discount_rules_has_price_override_method($hasPriceOverride, $product){ | |
return true; | |
} | |
} | |
add_filter('woo_discount_rules_has_price_override', 'woo_discount_rules_has_price_override_method', 10, 2); |
NewerOlder