• Resolved daymobrew

    (@daymobrew)


    I am running WordPress 6.8.3, WooCommerce 10.2.2, WooCommerce Square 5.1.0 on PHP 8.1.33 and I get the following PHP deprecation warning:

    PHP Deprecated: Optional parameter $location_ids declared before required parameter $start_time is implicitly treated as a required parameter in /wp-content/plugins/woocommerce-square/includes/Gateway/API.php on line 734

    The line is:

    public function search_orders( $location_ids = array(), $start_time, $limit = 100, $cursor = '', $end_time = '' )

    $start_time should have a default value or moved in front of $location_ids.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for sharing the details. I’ve activated the same plugin on my site but wasn’t able to replicate the issue on my end.

    For testing purposes, could you please try changing your PHP version to 8.3 and see if you still experience the same issue?

    Also, I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    • System Status Report which you can find via WooCommerce > Status
    • Fatal error logs (if any) under WooCommerce > Status > Logs.

    Please use https://pastebin.com/ or https://gist.github.com/ and share a link to that paste in reply here. Once we have more information, we’ll be able to assist you further.

    Thread Starter daymobrew

    (@daymobrew)

    I switched to PHP 8.3 and the warning is there when I log into the admin area.

    System Status Report

    There are no fatal logs.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for sharing the system status report. I’ve tried to replicate the issue on my end but wasn’t able to see that warning on my site, although the same code also exists in the Square plugin I’m using.

    For testing purposes, could you please create a staging site, deactivate all plugins except WooCommerce, then reinstall the Square plugin and check if you still see the warning?

    I’ve tested this on two different sites but wasn’t able to replicate the issue.

    Thread Starter daymobrew

    (@daymobrew)

    I have set up a staging site and it only has WordPress 6.8.3, WooCommerce 10.2.2 and WooCommerce Square 5.1.0.

    I get the same warnings:

    [13-Oct-2025 09:05:13 UTC] PHP Deprecated: Optional parameter $location_ids declared before required parameter $start_time is implicitly treated as a required parameter in /wp-content/plugins/woocommerce-square/includes/Gateway/API.php on line 734

    I don’t know why you do not see it but it is a deprecation since 8.0.0.

    See Example 6 that covers this.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for confirming and sharing the details. It appears that this is indeed a bug. Our developers are already aware of it, and a fix is being tested in the next release — you can follow the progress here:
    👉 https://github.com/woocommerce/woocommerce-square/pull/413

    For now, the notice is only a PHP deprecation warning and does not affect your store’s functionality. The update including the fix should be available soon.

    Plugin Support Chris Moreira – a11n

    (@chrism245)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

    If you have a few minutes, we’d love if you could leave us a review: https://ww.wp.xz.cn/support/plugin/woocommerce-square/reviews/

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

You must be logged in to reply to this topic.