Title: PHP Error Warning in Php 8.0+
Last modified: January 10, 2023

---

# PHP Error Warning in Php 8.0+

 *  Resolved [Dishang Shah](https://wordpress.org/support/users/dsuinfo/)
 * (@dsuinfo)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/php-error-warning-in-php-8-0/)
 * [https://prnt.sc/pHqIhDB4rCvj](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](https://wordpress.org/support/users/asanaplugins/)
 * (@asanaplugins)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-warning-in-php-8-0/#post-16362523)
 * Hi [@dsuinfo](https://wordpress.org/support/users/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.

 * ![](https://ps.w.org/easy-woocommerce-discounts/assets/icon-256x256.jpg?rev=2788194)
 * [Discount Rules and Dynamic Pricing for WooCommerce](https://wordpress.org/plugins/easy-woocommerce-discounts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-woocommerce-discounts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-woocommerce-discounts/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-woocommerce-discounts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-woocommerce-discounts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-woocommerce-discounts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [AsanaPlugins](https://wordpress.org/support/users/asanaplugins/)
 * Last activity: [3 years, 4 months ago](https://wordpress.org/support/topic/php-error-warning-in-php-8-0/#post-16362523)
 * Status: resolved