woocommerce_api_create_order_refund

woocommerce_api_create_order_refund

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

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_create_order_refund') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-orders.php line 1636
    1633
    1634
    1635
    1636
    1637
    1638
    1639
    1640
    1641
    1642
        // HTTP 201 Created
        $this->server->send_status( 201 );
     
        do_action( 'woocommerce_api_create_order_refund', $refund->get_id(), $order_id, $this );
     
        return $this->get_order_refund( $order_id, $refund->get_id() );
    } catch ( WC_Data_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => 400 ) );
    } catch ( WC_API_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
  • /includes/legacy/api/v3/class-wc-api-orders.php line 1681
    1678
    1679
    1680
    1681
    1682
    1683
    1684
    1685
    1686
    1687
        // HTTP 201 Created
        $this->server->send_status( 201 );
     
        do_action( 'woocommerce_api_create_order_refund', $refund->get_id(), $order_id, $this );
     
        return $this->get_order_refund( $order_id, $refund->get_id() );
    } catch ( WC_Data_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => 400 ) );
    } catch ( WC_API_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );