woocommerce_api_edit_coupon

woocommerce_api_edit_coupon

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

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

do_action('woocommerce_api_edit_coupon') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-coupons.php line 435
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
        if ( isset( $data['customer_emails'] ) ) {
            update_post_meta( $id, 'customer_email', array_filter( array_map( 'sanitize_email', $data['customer_emails'] ) ) );
        }
     
        do_action( 'woocommerce_api_edit_coupon', $id, $data );
        do_action( 'woocommerce_update_coupon', $id );
     
        return $this->get_coupon( $id );
    } catch ( WC_API_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
    }
  • /includes/legacy/api/v3/class-wc-api-coupons.php line 433
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
        if ( isset( $data['customer_emails'] ) ) {
            update_post_meta( $id, 'customer_email', array_filter( array_map( 'sanitize_email', $data['customer_emails'] ) ) );
        }
     
        do_action( 'woocommerce_api_edit_coupon', $id, $data );
        do_action( 'woocommerce_update_coupon', $id );
     
        return $this->get_coupon( $id );
    } catch ( WC_API_Exception $e ) {
        return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
    }