• Resolved pimwick

    (@pimwick)


    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_order which is missing from the Afterpay implementation.

    If you review /woocommerce/includes/class-wc-checkout.php and search for woocommerce_checkout_create_order you will see that this action is called just before the woocommerce_checkout_update_order_meta action hook.

    It looks like all that is needed is the following line to be added just above the woocommerce_checkout_update_order_meta hook 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Afterpay

    (@afterpayit)

    Hi pimwick,

    Thank you for your message, and for providing a high level of detail.

    These details have been added to a new ticket submitted via Afterpay’s internal tracking system for consideration and review by the team.

    Any changes to the plugin that are approved for release will become available through the standard interface for managing plugin updates in the WordPress admin.

    Thank you.

    Hi pimwick

    I am using WooCommerce order delivery date plugin. Delivery date field not capture in order meta when I am select afterpay as a payment method.

    FYI: It is working fine with paypal method.

    I have also tried after adding line
    do_action( 'woocommerce_checkout_create_order', $order, $posted );
    as you mentioned. But still it is not capturing delivery date field in order meta.

    Can you please have a look on this?

    • This reply was modified 5 years, 6 months ago by hardik.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Missing action: woocommerce_checkout_create_order’ is closed to new replies.