From dcbb17a99d6b951d2689e6b740a0bcb1d7a64aa4 Mon Sep 17 00:00:00 2001 From: "Dev49.net" Date: Fri, 5 Feb 2016 01:44:19 +0100 Subject: [PATCH] added actions before and after payment Issue #10276 --- includes/class-wc-form-handler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index 4335d0c7486..dd130f69da4 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -273,6 +273,8 @@ class WC_Form_Handler { $order_id = absint( $wp->query_vars['order-pay'] ); $order = wc_get_order( $order_id ); + do_action( 'woocommerce_before_pay_action', $order, $order_key ); + if ( $order->id == $order_id && $order->order_key == $order_key && $order->needs_payment() ) { // Set customer location to order location @@ -339,6 +341,8 @@ class WC_Form_Handler { } } + do_action( 'woocommerce_after_pay_action', $order, $order_key ); + } }