• Resolved Ceylon Themes

    (@ceylonthemes)


    I am using PHP 5.6, WordPress 5.2 and PHP Warnings and Add to cart button not working when currency switcher installed ?

    PHP Warning: Missing argument 2 for WOOCS::woocommerce_add_to_cart_hash() in …plugins\woocommerce-currency-switcher\classes\woocs_after_33.php on line 438

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @ceylonthemes.

    Try this solution:

    finde on plugin-folder/classes/woocs_after_33.php this code:

    //for normal shippng update if to change currency
        public function woocommerce_add_to_cart_hash($hash, $cart) {
            //return "";
            return md5(json_encode(WC()->cart->get_cart_for_session()) . $this->current_currency);
        }

    and replace with this code:

    //for normal shippng update if to change currency
        public function woocommerce_add_to_cart_hash($hash, $cart = null) {
              //return "";
            return md5(json_encode(WC()->cart->get_cart_for_session()) . $this->current_currency);
        }
    Thread Starter Ceylon Themes

    (@ceylonthemes)

    Can you update the plugin ?

    Hello @ceylonthemes.

    In the next version we will fix it.

    Plugin Author RealMag777

    (@realmag777)

    Hello

    Update with the fix is released …

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP warning and Add to cart not working’ is closed to new replies.