| @@ -175,9 +175,10 @@ | ||
| 175 | 175 | $order_item_id = get_post_meta( $expired, '_subscrpt_order_item_id', true ); |
| 176 | 176 | $item_quantity = (int) wc_get_order_item_meta( $order_item_id, '_qty', true ); |
| 177 | 177 | if ( $item_quantity !== $quantity ) { |
| 178 | 178 | WC()->cart->set_quantity( $cart_item_key, $item_quantity ); |
| 179 | - wc_add_notice( 'You can only add ' . $item_quantity . ' ' . ( $item_quantity > 1 ? 'items' : 'item' ) . ' on cart!', 'error' ); | |
| 179 | + /* translators: %d: the number of items allowed in the cart. */ | |
| 180 | + wc_add_notice( sprintf( _n( 'You can only add %d item to the cart.', 'You can only add %d items to the cart.', $item_quantity, 'subscription' ), $item_quantity ), 'error' ); | |
| 180 | 181 | } |
| 181 | 182 | } |
| 182 | 183 | } |
| 183 | 184 | |
| @@ -216,9 +217,10 @@ | ||
| 216 | 217 | $order_item_id = get_post_meta( $expired, '_subscrpt_order_item_id', true ); |
| 217 | 218 | $item_quantity = (int) wc_get_order_item_meta( $order_item_id, '_qty', true ); |
| 218 | 219 | if ( $item_quantity !== $quantity ) { |
| 219 | 220 | WC()->cart->set_quantity( $cart_item_key, $item_quantity ); |
| 220 | - wc_add_notice( 'You can only add ' . $item_quantity . ' ' . ( $item_quantity > 1 ? 'items' : 'item' ) . ' on cart!', 'error' ); | |
| 221 | + /* translators: %d: the number of items allowed in the cart. */ | |
| 222 | + wc_add_notice( sprintf( _n( 'You can only add %d item to the cart.', 'You can only add %d items to the cart.', $item_quantity, 'subscription' ), $item_quantity ), 'error' ); | |
| 221 | 223 | } |
| 222 | 224 | } |
| 223 | 225 | } |
| 224 | 226 | |