plugin updates
This commit is contained in:
@@ -13,7 +13,7 @@ use Automattic\WooCommerce\Utilities\StringUtil;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
require_once dirname( __FILE__ ) . '/legacy/class-wc-legacy-coupon.php';
|
||||
require_once __DIR__ . '/legacy/class-wc-legacy-coupon.php';
|
||||
|
||||
/**
|
||||
* Coupon class.
|
||||
@@ -1066,7 +1066,7 @@ class WC_Coupon extends WC_Legacy_Coupon {
|
||||
$err = __( 'Sorry, this coupon is not applicable to your cart contents.', 'woocommerce' );
|
||||
break;
|
||||
case self::E_WC_COUPON_USAGE_LIMIT_COUPON_STUCK:
|
||||
if ( is_user_logged_in() && wc_get_page_id( 'myaccount' ) > 0 ) {
|
||||
if ( is_user_logged_in() && wc_get_page_id( 'myaccount' ) > 0 && ! WC()->is_store_api_request() ) {
|
||||
/* translators: %s: myaccount page link. */
|
||||
$err = sprintf( __( 'Coupon usage limit has been reached. If you were using this coupon just now but your order was not complete, you can retry or cancel the order by going to the <a href="%s">my account page</a>.', 'woocommerce' ), wc_get_endpoint_url( 'orders', '', wc_get_page_permalink( 'myaccount' ) ) );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user