PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Plugin rules per category don't seem to work (video included)

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

hi, it's probably easier to just start with the short video I made that explains this:  https://youtu.be/uHdRmcrmWQY

Basically, I've got a rule set up to display products in the category"auction" in GBP (my shop's main currency), however, the geo rules on my location to display product prices in Thai Baht seem to be conflicting and winning the fight.  Is there a way that I can guarantee that all product in the 'auction' category absolutely are displayed in GBP? Or, is there a way that I can selectively totally disabled this plugin and its rules on certain pages?

Thanks

PS- this is the custom function I'm using that you provided to me last time:

add_filter('wp_head', 'set_custom_currency');

function set_custom_currency () { 
if (!class_exists("WOOCS")) {
return;
}
global $WOOCS;
if( has_term( 'auction', 'product_cat' ) ) { 
$WOOCS->set_currency('GBP');

} else {

$customer_country = $WOOCS->storage->get_val('woocs_user_country'); //fix this because $this won't have a reference, there will be a function to get the customer country

$currency = $WOOCS->get_currency_by_country($customer_country);

$WOOCS->set_currency($currency);

}

Actually, I'm not sure what's going on here. Because this glitch doesn't seem to be converting the price. It's just throwing the Thai baht currency symbol onto the GBP price.  I'm kind of baffled. Any advice or insights would be appreciated

Also, I don't know if it could be related to this but I've recently activated the litespeed caching plugin.  Could not possibly be screwing things up?  I've tried disabling most functions in this plug-in, but the problem seems to stick.

 

Hello

The problem is that your custom code is incompatible with this option- https://share.pluginus.net/image/i20220830092452.png

This function checks the current currency in ajax mode. Of course this condition if( has_term( 'auction', 'product_cat' ) )  will not work correctly in this case

try to add this  code(https://share.pluginus.net/image/i20220830093030.png)

if (wp_doing_ajax()) {

return;

}

 

@pavlo_borysenco thank you.  I gave this a try and it seems to work after clearing my cache.  :)

Hello

Great!  Welcome;)