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.
This commit is contained in:
Diego Zanella 2015-05-06 12:10:07 +01:00
parent af6998fe4d
commit 23724bde07
1 changed files with 2 additions and 0 deletions

View File

@ -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 ) ) {