woocommerce_api_coupon_response

woocommerce_api_coupon_response

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

See hook in core

Displaying hooks found in version: woocommerce.8.9.3

apply_filters('woocommerce_api_coupon_response') is found 3 times:

  • /includes/legacy/api/v1/class-wc-api-coupons.php line 137
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
            'minimum_amount'               => wc_format_decimal( $coupon->get_minimum_amount(), 2 ),
            'customer_emails'              => $coupon->get_email_restrictions(),
        );
     
        return array( 'coupon' => apply_filters( 'woocommerce_api_coupon_response', $coupon_data, $coupon, $fields, $this->server ) );
    }
     
    /**
     * Get the total number of coupons
     *
     * @since 2.1
  • /includes/legacy/api/v2/class-wc-api-coupons.php line 145
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
                'customer_emails'              => $coupon->get_email_restrictions(),
                'description'                  => $coupon->get_description(),
            );
     
            return array( 'coupon' => apply_filters( 'woocommerce_api_coupon_response', $coupon_data, $coupon, $fields, $this->server ) );
        } 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 145
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
                'customer_emails'              => $coupon->get_email_restrictions(),
                'description'                  => $coupon->get_description(),
            );
     
            return array( 'coupon' => apply_filters( 'woocommerce_api_coupon_response', $coupon_data, $coupon, $fields, $this->server ) );
        } catch ( WC_API_Exception $e ) {
            return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
        }
    }
     
    /**