• Resolved RLDD

    (@rermis)


    Hello,
    We receive the following warning in a PHP 8 environment:

    Parameter $request follows optional parameter $wholesale_role in /plugins/woocommerce-wholesale-prices/includes/api/v1/class-wwp-rest-api-wholesale-products-variations-v1-controller.php on line 170

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Fauzan Azizie

    (@fauzanade)

    Hi @rermis,

    I’m afraid we don’t support PHP 8 yet. I’ll submit this as a feature suggestion for the development team to review. But I’m afraid I couldn’t give you the ETA upon completion. Kindly be patient and we’ll definitely keep you in the loop when the update is released.

    For the time being, could you please downgrade your PHP to 7.4?

    I apologize for any inconvenience this may cause.

    Thread Starter RLDD

    (@rermis)

    Hi Fauzan,

    Thanks for your reply. I understand your hesitation, but PHP 8 isn’t really a feature, it’s inevitable 🙂 All that’s required for PHP 8 compatibility is to remove the default value for the first parameter in the declaration of get_wholesale_variations($wholesale_role = ”, $request). The second parameter is required, so the function call must already have both parameters. You can add if(empty($wholesale_role)) $wholesale_role=”; to the first line in the function to ensure the value defaults to blank.

    Plugin Support Fauzan Azizie

    (@fauzanade)

    Hi @rermis,

    I’d like to inform you that we’ve made our WooCommerce Wholesale Prices to be compatible with PHP 8. Please kindly update your WooCommerce Wholesale Prices to the latest version.

    Cheers 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Warning in PHP 8’ is closed to new replies.