Missing action: woocommerce_checkout_create_order
-
Hello, we have a Gift Card plugin that currently isn’t compatible with Afterpay Gateway for WooCommerce.
We have traced the issue to a missing action call. It appears that the WC_Gateway_Afterpay.php file manually handles the checkout process based on the WooCommerce checkout code. However, the official WooCommerce checkout calls the action
woocommerce_checkout_create_orderwhich is missing from the Afterpay implementation.If you review /woocommerce/includes/class-wc-checkout.php and search for
woocommerce_checkout_create_orderyou will see that this action is called just before thewoocommerce_checkout_update_order_metaaction hook.It looks like all that is needed is the following line to be added just above the
woocommerce_checkout_update_order_metahook inside of WC_Gateway_Afterpay.php (line 1953 in v2.0.4):do_action( 'woocommerce_checkout_create_order', $order, $posted );Can you look into adding this hook to ensure maximum compatibility with other plugins? Thanks!
The topic ‘Missing action: woocommerce_checkout_create_order’ is closed to new replies.