Support » Plugin: WOOCS - Currency Switcher for WooCommerce Professional » disable currency switcher on some products

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mediawebster

    (@mediawebster)

    Hello

    You can use this code:

    add_filter('wp_head',function(){    
        if( class_exists('WOOCS') && is_product() ){
            global $product;
            if( $product->get_id() != $this_product_id){
               return false;
            }
            global $WOOCS;
            $WOOCS->set_currency('GBP');
        }
    });
    Thread Starter Kiran

    (@kiran11more)

    what this code does exactly?

    Plugin Support mediawebster

    (@mediawebster)

    Hello

    This is an example code that should switch currency to GBP on a specific product page

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.