From 23724bde0766615cdda93e3b8c6306c84d06706f Mon Sep 17 00:00:00 2001 From: Diego Zanella Date: Wed, 6 May 2015 12:10:07 +0100 Subject: [PATCH] Added new `wc_paypal_standard_refund_before` action * The action will allow to intercept a refund just before it's placed, and to alter the parameters, if required. --- includes/gateways/paypal/class-wc-gateway-paypal.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/gateways/paypal/class-wc-gateway-paypal.php b/includes/gateways/paypal/class-wc-gateway-paypal.php index c1d397f3bb6..50e755c4b53 100644 --- a/includes/gateways/paypal/class-wc-gateway-paypal.php +++ b/includes/gateways/paypal/class-wc-gateway-paypal.php @@ -278,6 +278,8 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway { WC_Gateway_Paypal_Refund::$api_password = $this->get_option( 'api_password' ); WC_Gateway_Paypal_Refund::$api_signature = $this->get_option( 'api_signature' ); + do_action('wc_paypal_standard_refund_before', $order, $amount, $reason, $this); + $result = WC_Gateway_Paypal_Refund::refund_order( $order, $amount, $reason, $this->testmode ); if ( is_wp_error( $result ) ) {