Skip to content

Instantly share code, notes, and snippets.

@bradleysa
Created April 22, 2022 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradleysa/fc85630670143289238812c48d86500e to your computer and use it in GitHub Desktop.
Save bradleysa/fc85630670143289238812c48d86500e to your computer and use it in GitHub Desktop.
WooCommerce: Change add to cart button for variable product
/**
Change add to cart button for variable product
*/
add_filter('variable_add_to_cart_text', 'my_custom_cart_button_text');
function my_custom_cart_button_text() {
return __('Select Product', 'woocommerce');
}
/** Source: https://codeastrology.com/change-woocommerce-add-to-cart-text/ **/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment