Merge pull request #10282 from Dev49net/master

Add actions in pay_action() method
This commit is contained in:
Mike Jolley 2016-02-08 09:56:55 +00:00
commit 620394c4d3
1 changed files with 5 additions and 0 deletions

View File

@ -275,6 +275,8 @@ class WC_Form_Handler {
if ( $order->id == $order_id && $order->order_key == $order_key && $order->needs_payment() ) { if ( $order->id == $order_id && $order->order_key == $order_key && $order->needs_payment() ) {
do_action( 'woocommerce_before_pay_action', $order );
// Set customer location to order location // Set customer location to order location
if ( $order->billing_country ) { if ( $order->billing_country ) {
WC()->customer->set_country( $order->billing_country ); WC()->customer->set_country( $order->billing_country );
@ -337,6 +339,9 @@ class WC_Form_Handler {
wp_safe_redirect( $order->get_checkout_order_received_url() ); wp_safe_redirect( $order->get_checkout_order_received_url() );
exit; exit;
} }
do_action( 'woocommerce_after_pay_action', $order );
} }
} }