Title: PHP Deprecated Error
Last modified: October 4, 2021

---

# PHP Deprecated Error

 *  Resolved [mathijsnm](https://wordpress.org/support/users/mathijsnm/)
 * (@mathijsnm)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/php-deprecated-error-6/)
 * Hello,
 * Since 5.6.0 the site stopped working and is giving PHP Deprecated errors.
 *     ```
       [03-Oct-2021 18:45:51 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 795
       [03-Oct-2021 18:45:51 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 840
       [03-Oct-2021 18:45:51 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 884
       [03-Oct-2021 18:45:51 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 961
       [03-Oct-2021 18:45:53 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 795
       [03-Oct-2021 18:45:53 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 840
       [03-Oct-2021 18:45:53 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 884
       [03-Oct-2021 18:45:53 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 961
       [03-Oct-2021 18:46:02 UTC] PHP Warning:  Undefined variable $excluded_products in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:46:02 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php:231
       Stack trace:
       #0 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php(231): count()
       #1 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/class-frontend.php(197): WooMotiv\get_products()
       #2 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(303): WooMotiv\Frontend->ajax_get_items()
       #3 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #4 /var/www/vhosts/luashop.net/httpdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
       #5 /var/www/vhosts/luashop.net/httpdocs/wp-admin/admin-ajax.php(202): do_action()
       #6 {main}
         thrown in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:46:09 UTC] PHP Warning:  Undefined variable $excluded_products in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:46:09 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php:231
       Stack trace:
       #0 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php(231): count()
       #1 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/class-frontend.php(197): WooMotiv\get_products()
       #2 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(303): WooMotiv\Frontend->ajax_get_items()
       #3 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #4 /var/www/vhosts/luashop.net/httpdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
       #5 /var/www/vhosts/luashop.net/httpdocs/wp-admin/admin-ajax.php(202): do_action()
       #6 {main}
         thrown in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:46:21 UTC] PHP Warning:  Undefined variable $excluded_products in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:46:21 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php:231
       Stack trace:
       #0 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php(231): count()
       #1 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/class-frontend.php(197): WooMotiv\get_products()
       #2 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(303): WooMotiv\Frontend->ajax_get_items()
       #3 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #4 /var/www/vhosts/luashop.net/httpdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
       #5 /var/www/vhosts/luashop.net/httpdocs/wp-admin/admin-ajax.php(202): do_action()
       #6 {main}
         thrown in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:47:49 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 795
       [03-Oct-2021 18:47:49 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 840
       [03-Oct-2021 18:47:49 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 884
       [03-Oct-2021 18:47:49 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 961
       [03-Oct-2021 18:47:52 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 795
       [03-Oct-2021 18:47:52 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 840
       [03-Oct-2021 18:47:52 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 884
       [03-Oct-2021 18:47:52 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 961
       [03-Oct-2021 18:47:52 UTC] PHP Fatal error:  Cannot declare class WC_Stripe_REST_Controller, because the name is already in use in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-rest-controller.php on line 0
       [03-Oct-2021 18:47:58 UTC] PHP Fatal error:  Cannot declare class WC_Stripe_REST_Controller, because the name is already in use in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woocommerce-gateway-stripe/includes/admin/class-wc-stripe-rest-controller.php on line 0
       [03-Oct-2021 18:48:04 UTC] PHP Warning:  Undefined variable $excluded_products in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:48:04 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php:231
       Stack trace:
       #0 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php(231): count()
       #1 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/class-frontend.php(197): WooMotiv\get_products()
       #2 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(303): WooMotiv\Frontend->ajax_get_items()
       #3 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #4 /var/www/vhosts/luashop.net/httpdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
       #5 /var/www/vhosts/luashop.net/httpdocs/wp-admin/admin-ajax.php(187): do_action()
       #6 {main}
         thrown in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:48:09 UTC] PHP Warning:  Undefined variable $excluded_products in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:48:09 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php:231
       Stack trace:
       #0 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php(231): count()
       #1 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/class-frontend.php(197): WooMotiv\get_products()
       #2 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(303): WooMotiv\Frontend->ajax_get_items()
       #3 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #4 /var/www/vhosts/luashop.net/httpdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
       #5 /var/www/vhosts/luashop.net/httpdocs/wp-admin/admin-ajax.php(187): do_action()
       #6 {main}
         thrown in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:48:14 UTC] PHP Warning:  Undefined variable $excluded_products in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:48:14 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php:231
       Stack trace:
       #0 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php(231): count()
       #1 /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/class-frontend.php(197): WooMotiv\get_products()
       #2 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(303): WooMotiv\Frontend->ajax_get_items()
       #3 /var/www/vhosts/luashop.net/httpdocs/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #4 /var/www/vhosts/luashop.net/httpdocs/wp-includes/plugin.php(470): WP_Hook->do_action()
       #5 /var/www/vhosts/luashop.net/httpdocs/wp-admin/admin-ajax.php(187): do_action()
       #6 {main}
         thrown in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/woomotiv/lib/functions.php on line 231
       [03-Oct-2021 18:48:32 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 795
       [03-Oct-2021 18:48:32 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 840
       [03-Oct-2021 18:48:32 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 884
       [03-Oct-2021 18:48:32 UTC] PHP Deprecated:  Required parameter $class follows optional parameter $name in /var/www/vhosts/luashop.net/httpdocs/wp-content/plugins/leverage-extra/inc/style.php on line 961
       ```
   
 * Yes we know this says its an issue with leverage extra but that plugin hasnt 
   been updated and yours has. The site also sent an email saying its caused by 
   this plugin.
 * Php version 8.0.10
    Wordpress Version 5.8.1 Leverage version 2.1.1 Woocommerce
   stripe gateway version 5.6.0

Viewing 1 replies (of 1 total)

 *  Plugin Support [Saravanan S, a11n](https://wordpress.org/support/users/simplysaru/)
 * (@simplysaru)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/php-deprecated-error-6/#post-14939889)
 * Hi [@mathijsnm](https://wordpress.org/support/users/mathijsnm/),
 * When you disable plugins “leverage-extra” and “woomotiv”. Do you see these errors
   stop and does the site works as normal?
 * I’d like to understand more about your setup.
 * Could you please send me a copy of your site’s System Status? You can find it
   via WooCommerce > Status. Select “Get system report” and then “Copy for support”.
 * Once you’ve done that, you can paste the text in [https://gist.github.com/](https://gist.github.com/)
   and feel free to change/remove your site URL in the report for privacy reasons.
 * Once you do that, you can paste the Gist link here in your reply.

Viewing 1 replies (of 1 total)

The topic ‘PHP Deprecated Error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-gateway-stripe/assets/icon-256x256.png?rev=3177277)
 * [WooCommerce Stripe Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-stripe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-gateway-stripe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-gateway-stripe/reviews/)

## Tags

 * [PHP Deprecated](https://wordpress.org/support/topic-tag/php-deprecated/)

 * 1 reply
 * 2 participants
 * Last reply from: [Saravanan S, a11n](https://wordpress.org/support/users/simplysaru/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/php-deprecated-error-6/#post-14939889)
 * Status: resolved