Support » Plugin: WooCommerce » Alert Message “Sorry, no products matched your selection.”
Alert Message “Sorry, no products matched your selection.”
-
Hi there. I am trying to change what the alert message wc-no-matching-variations woocommerce-info which reads “Sorry, no products matched your selection. Please choose a different combination.”
I would like to change it to simple “out of stock” but I cannot find a solution after searching through other topics.
The page I need help with: [log in to see the link]
-
Hi @alovinggoodbye,
I think the best way to do that would be to use a translation plugin like Loco Translate and translating it in the same language. That way your new translation will show instead of the default one!
Awsome! I will have to check this out. Thanks man!
I am still having a hard time that exact message to change. An example of the message I am getting is here …
1) https://www.dailymutt.com/product/ok-cat-wine-jersey-crew/
2) Click on the color pink under the “colors” selection
3) Then chose size mediumThat is an example of the error message “Sorry, no products matched your selection. Please choose a different combination.” I am trying to change to simply “out of stock”
So sorry to bother I am new to this!
Sorry one last thing. I found the php code that controls the message
case ‘wc-add-to-cart-variation’:
// We also need the wp.template for this script :).
wc_get_template( ‘single-product/add-to-cart/variation.php’ );
$params = array(
‘wc_ajax_url’ => WC_AJAX::get_endpoint( ‘%%endpoint%%’ ),
‘i18n_no_matching_variations_text’ => esc_attr__( ‘Sorry, this is out of stock. Please chose a diff.’, ‘woocommerce’ ),
‘i18n_make_a_selection_text’ => esc_attr__( ‘Please select some product options before adding this product to your cart.’, ‘woocommerce’ ),
‘i18n_unavailable_text’ => esc_attr__( ‘Sorry, this product is unavailable. Please choose a different combination.’, ‘woocommerce’ ),
);And I downloaded a widget called php snippet trying to add this in to change what the message says. But in the widget it is asking me for the “Tracking Name” and I am not sure what the means. Do you have any insight into this.
Ignore those other messages! I am so sorry. I got this far.
I downloaded the plugin Loco Translate but am a little confused. I am having a hard time seeing what exactly I need to change.
In Loco I found the source text the source. “Sorry, no products matched your selection. Please choose a different combination.”
Now that I found it what do I need to do in Loco to make the change? I am just a little confused.
Sorry I am sure this is beating a dead horse just wanted any new insight anyone can offer! Thank you.
- You must be logged in to reply to this topic.