Product Page

WooCommerce Change “Choose Some Product Options” Text

Pre-Requisites

There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About This Solution

A lot of the time, users will miss the attribute drop down on a variable product page and immediately go for the add to cart button. If this happens, and the user has not yet selected an option from the drop down, a window alert will appear saying “Choose Some Product Options”. This is not particularly user friendly and definitely isn’t tailored towards your product range. Being more specific with messages can benefit the user experience and help them understand what they are doing wrong and what they need to do in order to proceed. Making the ability to add a product to cart should not be difficult! This short guide shows you can change change this alert message to something a little more specific to your product range.

/**
* Snippet Name:     Change the "Choose some product options" text on WooCommerce variable product drop-downs.
* Snippet Author:   ecommercehints.com
*/

add_filter( 'woocommerce_get_script_data', 'change_alert_text', 10, 2 );
function change_alert_text( $params, $handle ) {
if ( $handle === 'wc-add-to-cart-variation' )
$params['i18n_make_a_selection_text'] = __( 'Please select a date first', 'domain' );
return $params;
}

Snippet Benefits

  • Personalise and make clearer error messages on variable product pages.
  • If you’re using WooCommerce to sell events for example, you may wish to change the message to “select a date first” which is a lot more specific and clearer, benefiting the User Experience (UX) and hopefully increasing conversions.

100 WooCommerce Conversion Rate Optimisation Tips

This field is for validation purposes and should be left unchanged.

Let’s collaborate!

Need to outsource WordPress development?

Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.

First Timer Here?

Sign up to receive 10% off on your first month with us.

26027
WELCOME OFFER