1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Advanced
  5. Filter ‘Select Options’ text
  1. Home
  2. Knowledge Base
  3. WooCommerce Product Add-Ons Ultimate
  4. Filter ‘Select Options’ text

Filter ‘Select Options’ text

By default, the plugin displays the text ‘Select Options’ instead of an add to cart button on any archive pages. The button directs the user to the product page in the same way as ‘Select Options’ does for variable products. This is to prevent the user from adding the product to the cart without selecting any add-on fields.

If you would like to change the ‘Select Options’ text, just use this snippet:

<?php
/**
* Filter 'View Product' text
*/
function prefix_filter_view_product_text( $text, $product ) {
return 'Select Options';
}
add_filter( 'pewc_filter_view_product_text', 'prefix_filter_view_product_text', 10, 2 );

You can find out how to add a snippet to your site here.

Was this article helpful?

Related Articles