• Resolved stelter

    (@stelter)


    If I complete an order, I get an uncaught error.

    Was passiert – in Kurzform
    Zwei Plugins („WooCommerce POS“ und „Flexible Subscriptions“ von WP Desk) streiten sich um denselben Filter woocommerce_valid_order_statuses_for_payment: Filter-AufrufErwartete ParameterTatsächlich übergebenWooCommerce POS – Orders::valid_order_statuses_for_payment()$statuses, $order (2 Parameter)–Flexible Subscriptions ruft apply_filters() aufnur$statuses (1 Parameter)⚠️

    Weil WooCommerce POS zwei Argumente erzwingt, kracht es mit „Too few arguments…“.

    Flexible Subscriptions Version 1.6.1
    WooCommerce Version 9.9.5 
    WooCommerce POS Version 1.7.11

    {“code”:”qm_fatal”,”message”:”Uncaught Error: Too few arguments to function WCPOS\WooCommercePOS\Orders::valid_order_statuses_for_payment(), 1 passed in /data/sites/web/b42okhmyrdbxio/www/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected in /data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/woocommerce-pos/includes/Orders.php on line 103″,”data”:{“message”:”Uncaught Error: Too few arguments to function WCPOS\WooCommercePOS\Orders::valid_order_statuses_for_payment(), 1 passed in /data/sites/web/b42okhmyrdbxio/www/wp-includes/class-wp-hook.php on line 324 and exactly 2 expected”,”file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/woocommerce-pos/includes/Orders.php”,”line”:103,”trace”:[{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/class-wp-hook.php”,”line”:324,”function”:”valid_order_statuses_for_payment”,”class”:”WCPOS\WooCommercePOS\Orders”,”type”:”->”,”args”:[[“pending”,”on-hold”,”failed”]]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/plugin.php”,”line”:205,”function”:”apply_filters”,”class”:”WP_Hook”,”type”:”->”,”args”:[[“pending”,”on-hold”,”failed”],[[“pending”,”on-hold”,”failed”]]]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/flexible-subscriptions/src/HookProvider/OrderStatusListener.php”,”line”:204,”function”:”apply_filters”,”args”:[“woocommerce_valid_order_statuses_for_payment”,[“pending”,”on-hold”,”failed”]]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/flexible-subscriptions/src/HookProvider/OrderStatusListener.php”,”line”:141,”function”:”is_payment_completed”,”class”:”WPDesk\FlexibleSubscriptions\HookProvider\OrderStatusListener”,”type”:”->”,”args”:[“processing”,”completed”]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/flexible-subscriptions/src/HookProvider/OrderStatusListener.php”,”line”:44,”function”:”subscription_parent_status_changed”,”class”:”WPDesk\FlexibleSubscriptions\HookProvider\OrderStatusListener”,”type”:”->”,”args”:[{“refunds”:null,”customer_id”:null},”processing”,”completed”]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/class-wp-hook.php”,”line”:324,”function”:”on_status_changed”,”class”:”WPDesk\FlexibleSubscriptions\HookProvider\OrderStatusListener”,”type”:”->”,”args”:[1425,”processing”,”completed”,{“refunds”:null,”customer_id”:null}]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/class-wp-hook.php”,”line”:348,”function”:”apply_filters”,”class”:”WP_Hook”,”type”:”->”,”args”:[null,[1425,”processing”,”completed”,{“refunds”:null,”customer_id”:null}]]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/plugin.php”,”line”:517,”function”:”do_action”,”class”:”WP_Hook”,”type”:”->”,”args”:[[1425,”processing”,”completed”,{“refunds”:null,”customer_id”:null}]]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/woocommerce/includes/class-wc-order.php”,”line”:450,”function”:”do_action”,”args”:[“woocommerce_order_status_changed”,1425,”processing”,”completed”,{“refunds”:null,”customer_id”:null}]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/woocommerce/includes/class-wc-order.php”,”line”:274,”function”:”status_transition”,”class”:”WC_Order”,”type”:”->”,”args”:[]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/woocommerce/includes/class-wc-order.php”,”line”:394,”function”:”save”,”class”:”WC_Order”,”type”:”->”,”args”:[]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-content/plugins/woocommerce/includes/class-wc-ajax.php”,”line”:606,”function”:”update_status”,”class”:”WC_Order”,”type”:”->”,”args”:[“completed”,””,true]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/class-wp-hook.php”,”line”:324,”function”:”mark_order_status”,”class”:”WC_AJAX”,”type”:”::”,”args”:[“”]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/class-wp-hook.php”,”line”:348,”function”:”apply_filters”,”class”:”WP_Hook”,”type”:”->”,”args”:[“”,[“”]]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-includes/plugin.php”,”line”:517,”function”:”do_action”,”class”:”WP_Hook”,”type”:”->”,”args”:[[“”]]},{“file”:”/data/sites/web/b42okhmyrdbxio/www/wp-admin/admin-ajax.php”,”line”:192,”function”:”do_action”,”args”:[“wp_ajax_woocommerce_mark_order_status”]}]}}

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter stelter

    (@stelter)

    kilbot 

    (@kilbot)

    31 minutes ago

    Hi @stelter, this is an error in the code of Flexible Subscriptions.

    Please contact them and let them know the second argument in apply_filters( 'woocommerce_valid_order_statuses_for_payment', [ 'pending', 'on-hold', 'failed' ] ), true ) should be an Order object, not a boolean.

    For more information refer them to the Usage: https://wp-kama.com/plugin/woocommerce/hook/woocommerce_valid_order_statuses_for_payment

    Plugin Support sebastianrybacki

    (@sebastianrybacki)

    Hello and thank you for your detailed report.

    You’re absolutely right — this issue is caused by an incorrect usage of the woocommerce_valid_order_statuses_for_payment filter in our Flexible Subscriptions plugin. It should indeed support the second $order parameter, as expected by WooCommerce POS.

    I’ve already passed this on to our development team responsible for Flexible Subscriptions, and they will work on a fix.

    Please allow us a bit of time to implement and test the solution. As soon as the update is ready, I’ll make sure to notify you here.

    Thanks again for bringing this to our attention and for your patience.

    Plugin Support sebastianrybacki

    (@sebastianrybacki)

    Hello,

    Thank you for your patience.

    We’ve just released an update for the Flexible Subscriptions plugin (version 1.6.2), which includes a fix for the issue you reported regarding the woocommerce_valid_order_statuses_for_payment filter conflict with WooCommerce POS.

    We recommend updating the plugin to the latest version.

    Kind regards,

    Thread Starter stelter

    (@stelter)

    Thank you for the quick fix.

    Plugin Support sebastianrybacki

    (@sebastianrybacki)

    Hello,

    Since everything seems to be working fine now, I’m marking this thread as resolved.
    Please don’t hesitate to open a new one if you run into any issues while using our plugin.

    Have a fantastic day!

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

The topic ‘Error with Woocommerce POS’ is closed to new replies.