WC_Brands_Coupons::brand_exclusion_error()
Display a custom error message when a cart discount coupon does not validate because an excluded brand was found in the cart.
Метод класса: WC_Brands_Coupons{}
Хуков нет.
Возвращает
Строку
.
Использование
$WC_Brands_Coupons = new WC_Brands_Coupons(); $WC_Brands_Coupons->brand_exclusion_error( $err, $err_code );
- $err(строка) (обязательный)
- The error message.
- $err_code(строка) (обязательный)
- The error code.
Код WC_Brands_Coupons::brand_exclusion_error() WC Brands Coupons::brand exclusion error WC 9.6.1
public function brand_exclusion_error( $err, $err_code ) { if ( self::E_WC_COUPON_EXCLUDED_BRANDS !== $err_code ) { return $err; } return __( 'Sorry, this coupon is not applicable to the brands of selected products.', 'woocommerce' ); }