WPCS - WordPress Currency Switcher Professional

wpcs_shortcode_price_html_manipulation

In shortcode [wpcs_price] allows to manipulate with generated price html code. (from v.2.3.1/1.3.1)

Example:

  • shortcode: [wpcs_price type=fixed value=EUR:45,USD:70 name=’sh1′]
  • To manipulate use next code (as an example):
    add_filter('wpcs_shortcode_price_html_manipulation', function ($price_html, $atts, $current_currency) {
        if (isset($atts['name'])) {
            switch ($atts['name']) {
                case 'sh1':
                    $price_html = preg_replace('/\.\d{2}/', '', $price_html);
                    break;
                default :
                    //you can add more cases if need
                    break;
            }
        }
    
        return $price_html;
    }, 10, 3);
    

     

Ref: https://pluginus.net/support/topic/fixed-prices-does-not-work