woocommerce_coupon_error хук-фильтрWC 1.0

When using this static method, there is no $this to pass to filter.

Использование

add_filter( 'woocommerce_coupon_error', 'wp_kama_woocommerce_coupon_error_filter', 10, 3 );

/**
 * Function for `woocommerce_coupon_error` filter-hook.
 * 
 * @param  $err      
 * @param  $err_code 
 * @param  $null     
 *
 * @return 
 */
function wp_kama_woocommerce_coupon_error_filter( $err, $err_code, $null ){

	// filter...
	return $err;
}
$err
-
$err_code
-
$null
-

Где вызывается хук

WC_Coupon::get_generic_coupon_error()
woocommerce_coupon_error
WC_Discounts::is_coupon_valid()
woocommerce_coupon_error
WC_Coupon::get_coupon_error()
woocommerce_coupon_error
woocommerce/includes/class-wc-coupon.php 1097
return apply_filters( 'woocommerce_coupon_error', $err, $err_code, null );
woocommerce/includes/class-wc-discounts.php 1009
$message = apply_filters( 'woocommerce_coupon_error', is_numeric( $e->getMessage() ) ? $coupon->get_coupon_error( $e->getMessage() ) : $e->getMessage(), $e->getCode(), $coupon );
woocommerce/includes/class-wc-coupon.php 1073
return apply_filters( 'woocommerce_coupon_error', $err, $err_code, $this );

Где используется хук в WooCommerce

Использование не найдено.