• Resolved Dishang Shah

    (@dsuinfo)


    https://prnt.sc/pHqIhDB4rCvj
    Check error with woocs compatiblity

    PHP Warning: Undefined global variable $woocs in /home/jwpmrdlz/public_html/wp-content/plugins/easy-woocommerce-discounts/includes/compatibility/class-wccs-compatibility-woocs.php on line 22

    I am using latest version of woocs currency switcher

    due to this error multi currency not working.

    thank you

Viewing 1 replies (of 1 total)
  • Plugin Author AsanaPlugins

    (@asanaplugins)

    Hi @dsuinfo

    Thank you for using our plugin.

    We apologize for the inconvenience.

    Actually, it is not an issue with php 8 and we checked the plugin with php 8 and currency swithcer and it is working properly.

    Maybe there is an issue on your website that does not allow the currency switcher plugin global variable to be initialize properly.

    You can replace the below code with the line 22 of the wp-content\plugins\easy-woocommerce-discounts\includes\compatibility\class-wccs-compatibility-woocs.php
    $this->woocs = isset( $GLOBALS['WOOCS'] ) ? $GLOBALS['WOOCS'] : null;

    When you replace the above line the error messages will gone but because the currency switcher plugin global ‘$WOOCS’ is not init properly on your site then the compatiblity does not work properly.

    Or maybe there is a conflict on your site that causes this issue. To find the conflict you can deactive other plugins one by one to find the issue.

    I hope it helps.

    Best Regards

Viewing 1 replies (of 1 total)

The topic ‘PHP Error Warning in Php 8.0+’ is closed to new replies.