Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author RealMag777

    (@realmag777)

    So, it was logic bug.
    Decision:
    – go to index.php
    – find function raw_woocommerce_price
    – comment code if ($this->is_multiple_allowed)

    public function raw_woocommerce_price($price)
        {
            //https://codex.wordpress.org/Function_Reference/is_admin
            //$is_admin = (bool) substr_count($_SERVER['REQUEST_URI'], 'wp-admin');
            $currencies = $this->get_currencies();
    
            //if ($this->is_multiple_allowed)
            {
                if ($this->current_currency != $this->default_currency)
                {
                    $price = number_format($price * $currencies[$this->current_currency]['rate'], 2, $this->decimal_sep, '');
                }
            }
    
            //***
            if ($this->current_currency == 'JPY')
            {
                $price = number_format(floatval($price), 0, '.', '');
            }
    
            return $price;
    
            //return round ( $price , 0 ,PHP_ROUND_HALF_EVEN );
            //return number_format ($price, 2, $this->decimal_sep, $this->thousands_sep);
        }

    +
    in public function __construct() add next filters:
    add_filter(‘woocommerce_get_sale_price’, array($this, ‘raw_woocommerce_price’), 9999);
    add_filter(‘woocommerce_get_variation_regular_price’, array($this, ‘raw_woocommerce_price’), 9999);
    add_filter(‘woocommerce_get_variation_sale_price’, array($this, ‘raw_woocommerce_price’), 9999);

    Update will be today …

    Plugin Author RealMag777

    (@realmag777)

    update done

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘UPDATE TO 1.0.9’ is closed to new replies.