• Resolved Free Fast

    (@freecook)


    There is an issue with woocommercw with PHP 8.1.

    Function register_rest_route was called incorrectly. The REST API route definition for fv_endpoint/v1/fvforceupdateautoupdate is missing a required permission_callback argument. For routes with REST API that are public, use __return_true as the permission callback.

    Someone may help to fix this issue? Thanks!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shameem – a11n

    (@shameemreza)

    Hi @freecook

    The error you’re encountering is due to a missing argument in the REST API route definition. As of WordPress 5.5, a permission_callback is required when registering a REST route.

    You can resolve this issue by adding a permission_callback to your register_rest_route function. If your REST API route is public, you can use __return_true as the permission_callback.

    Please try this solution and let us know how that goes.

    Please note that writing or providing custom code is not within the scope of our support policy. If you are still having problems, we recommend asking development questions on the #developers channel of the WooCommerce Community Slack. Many of our developers hang out there and will be able to offer insights into your question. You can also seek help from the following:

    I wish I could help more, but hopefully, this gets you going in the right direction to get the job done.

    Thread Starter Free Fast

    (@freecook)

    How can I fix this? What function I can add this?

    • This reply was modified 2 years, 6 months ago by Free Fast.
    Saif

    (@babylon1999)

    Hello @freecook,

    How can I fix this? What function I can add this?

    Could you please specify where you’re encountering this error? It seems to relate to WordPress’s REST API rather than WooCommerce.

    If you don’t already have a screenshot service installed, here are a few free options: 


    Could you also attach a copy of your site’s System Status report? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support” (after you scroll down a bit)”. Once done, please paste it here in your reply or via a text-sharing service like https://gist.github.com/.

    Look forward to hearing back from you,

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

The topic ‘Woocommerce issue on PHP 8’ is closed to new replies.