woocommerce_create_refund

woocommerce_create_refund

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_create_refund') is found 1 times:

  • /includes/wc-order-functions.php line 620
    		 * Action hook to adjust refund before save.
    		 *
    		 * @since 3.0.0
    		 */
    		do_action( 'woocommerce_create_refund', $refund, $args );
    
    		if ( $refund->save() ) {
    			if ( $args['refund_payment'] ) {
    				$result = wc_refund_payment( $order, $refund->get_amount(), $refund->get_reason() );
    
    				if ( is_wp_error( $result ) ) {