• HI,

    After updating my host to PHP 8.1 using the latest WP and WC, this plugin causes a fatal error at checkout when trying to pay via Paypal Standard (Error processing checkout). Paypal its the only payment method enabled on my shop.

    It happens all the time no matter if there’s a free sample or not in the cart.

    After disabling this plugin (Free Product Sample For Woocommerce) the error fully disappear and checkout works as expected.

    This is the log:

    2023-01-03T02:36:43+00:00 CRITICAL Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, no array or string given in /home/***/public_html/wp-includes/class-wp-hook.php:308
    Stack trace: 0 /home/***/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() 1 /home/***/public_html/wp-content/plugins/woo-free-product-sample/public/class-woo-free-product-sample-public.php(321): apply_filters() 2 /home/***/public_html/wp-includes/class-wp-hook.php(310): Woo_Free_Product_Sample_Public->wfps_save_posted_data_into_order() 3 /home/***/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 4 /home/***/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 5 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-deprecated-action-hooks.php(159): do_action() 6 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-deprecated-action-hooks.php(107): WC_Deprecated_Action_Hooks->trigger_hook() 7 /home/***/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-deprecated-hooks.php(75): WC_Deprecated_Action_Hooks->handle_deprecated_hook() 8 /home/***/public_html/wp-includes/class-wp-hook.php(308): WC_Deprecated_Hooks->maybe_handle_deprecated_hook() 9 /home/***/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 10 /home/***/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 11 /home/***/public_html/wp-content/plugins/woocommerce/includes/data-stores/abstract-wc-order-item-type-data-store.php(60): do_action() 12 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-data-store.php(186): Abstract_WC_Order_Item_Type_Data_Store->create() 13 /home/***/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-data.php(228): WC_Data_Store->create() 14 /home/***/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(267): WC_Data->save() 15 /home/***/public_html/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(204): WC_Abstract_Order->save_items() 16 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-order.php(244): WC_Abstract_Order->save() 17 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(449): WC_Order->save() 18 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(1256): WC_Checkout->create_order() 19 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(481): WC_Checkout->process_checkout() 20 /home/***/public_html/wp-includes/class-wp-hook.php(308): WC_AJAX::checkout() 21 /home/***/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 22 /home/***/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 23 /home/***/public_html/wp-content/plugins/woocommerce/includes/class-wc-ajax.php(94): do_action() 24 /home/***/public_html/wp-includes/class-wp-hook.php(308): WC_AJAX::do_wc_ajax() 25 /home/***/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() 26 /home/***/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() 27 /home/***/public_html/wp-includes/template-loader.php(13): do_action() 28 /home//public_html/wp-blog-header.php(19): require_once('/home//…') 29 /home//public_html/index.php(17): require('/home//…') 30 {main} thrown in /home/***/public_html/wp-includes/class-wp-hook.php on line 308

    Thank you

Viewing 1 replies (of 1 total)
  • Plugin Support Marc

    (@marcangel)

    Hi – thank for bringing this up. We are already working with this.

Viewing 1 replies (of 1 total)
  • The topic ‘Fatal error on PHP 8.1’ is closed to new replies.