woocommerce_api_edit_coupon_data

woocommerce_api_edit_coupon_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_edit_coupon_data') is found 2 times:

  • /includes/legacy/api/v2/class-wc-api-coupons.php line 335
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    if ( is_wp_error( $id ) ) {
        return $id;
    }
     
    $data = apply_filters( 'woocommerce_api_edit_coupon_data', $data, $id, $this );
     
    if ( isset( $data['code'] ) ) {
        global $wpdb;
     
        $coupon_code  = wc_format_coupon_code( $data['code'] );
        $id_from_code = wc_get_coupon_id_by_code( $coupon_code, $id );
  • /includes/legacy/api/v3/class-wc-api-coupons.php line 333
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    if ( is_wp_error( $id ) ) {
        return $id;
    }
     
    $data = apply_filters( 'woocommerce_api_edit_coupon_data', $data, $id, $this );
     
    if ( isset( $data['code'] ) ) {
        global $wpdb;
     
        $coupon_code  = wc_format_coupon_code( $data['code'] );
        $id_from_code = wc_get_coupon_id_by_code( $coupon_code, $id );