Subtotal condition compatible for Price Based on Country for WooCommerce by Oscar Gare
Ensure compatibility of subtotal conditions with the "Price Based on Country for WooCommerce" plugin by Oscar Gare.
add_filter('advanced_woo_discount_rules_converted_currency_value', function($price) {
if(is_numeric($price) && !empty($price)) {
if(function_exists('wcpbc_the_zone')){
if(wcpbc_the_zone()){
$price = wcpbc_the_zone()->get_exchange_rate_price( $price, true, 'generic', '' );
}
}
}
return $price;
}, 10);