Skip to content

Instantly share code, notes, and snippets.

@netwizards
Last active February 16, 2024 18:33
Show Gist options
  • Select an option

  • Save netwizards/41b7c67b72fbf94378d753f497a1559e to your computer and use it in GitHub Desktop.

Select an option

Save netwizards/41b7c67b72fbf94378d753f497a1559e to your computer and use it in GitHub Desktop.
Change Select Option Text in WooCommerce on Variable product
function woo_jazz_select_text_change() {
if ( $product->is_type( 'variable' ) ) {
return __( 'View product', 'woocommerce' );
}
return $label;
}
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_jazz_select_text_change', 9999, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment