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

WOOCS "Disable on pages" and TranslatePress

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!

Together with the TranslatePress per-language 'subdirectories' -- http://www.domain.com/lang/slug -- seems that the get_actual_obj regexp is not ok: using the slug in"Disable on pages" ( Reverse use) not working.

Thanks!

Hi again!

After digging some, found that $_SERVER['SCRIPT_URI'] is empty, so changing it to $_SERVER['REDIRECT_URL'] seems working, at least for the navigation... But if I am changing the currency on the checkout page, it reloads, for a moment I can see the right values, but with the ?wc-ajax=update_order_review reverts back to default currency...

I would like to achieve - because of 3rd party plugins display problems - to let the user select currency ONLY at checkout. Is there a way to solve it?

Hello

Please  add   this  code  in  functions.php

if (class_exists('WOOCS') AND !is_checkout()){

global $WOOCS;

$WOOCS->reset_currency();

}

Hello, Pablo!

It is not working the way I needed, still have the problem that the wp-ajax reverts.

Tried also adding"AND !wp_doing_ajax()" or"!defined('WOOCOMMERCE_CHECKOUT')" but still no luck... Always resets currency to basic...

Hello

Did  you add  this  code  with "wp_head"?

Drop me a  screenshot of the  code

Hello, Pablo.

First I just added to the functions.php but after your previus question I added using the wp_head action... Now it seems working, thank you!

add_action('wp_head', function() {
   global $WOOCS;
   if ( class_exists('WOOCS')) {
       if( !( is_checkout() || defined('WOOCOMMERCE_CHECKOUT'))) {
         $WOOCS->reset_currency();
       }
   }
});

Hello

Ok!  Great!  Welcome;)