Last active
December 20, 2023 01:25
-
-
Save alokstha1/ff168d58c6416b7e5ba8057d5a7b881b to your computer and use it in GitHub Desktop.
Woocommerce hook before checkout page submit and after order created
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//triggers before checkout form is submited but order will be created. | |
add_action( 'woocommerce_checkout_update_order_meta', 'cpm_woocommerce_checkout_update', 10, 2 ); | |
function cpm_woocommerce_checkout_update($order_id, $data) { | |
/*write ur code*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you.