This topic has 8 replies, 3 voices, and was last updated 2 years, 4 months ago ago by Olga Barlow
Some products in Shop page showing ‘Select Options’ button for products instead of ‘Buy Now’. How to make all products button to Buy Now in shop page.
https://snipboard.io/m3tlhY.jpg
Hello,
Check this topic https://www.8theme.com/topic/back-button-buy-now-instead-select-option/
Regards
As given in this link, I have given the following code in the Snippets
add_filter( ‘woocommerce_product_add_to_cart_text’, ‘bbloomer_change_select_options_button_text’, 9999, 2 );
function bbloomer_change_select_options_button_text( $label, $product ) {
if ( $product->is_type( ‘variable’ ) ) {
return ‘View Product’;
}
return $label;
}
But there is no change for the select option button of variable products in the shop page, now also it is displaying as select option button
screenshot : https://snipboard.io/XCEeK0.jpg
Thank You
Hello,
Please provide access, so we can take a closer look.
Regards
I Will provide the details
Snippets name is – select option to buy now button
Thank You
Hello,
The filter that we recommended for you before had some issues in your code https://prnt.sc/zZIzULBe8Kdp . Once we fixed it and wrote correctly it became to work for products but not for the one on first page ( https://prnt.sc/X4X16X-M9IxV )
The reason for such products was in plugin ‘
WooCommerce Product Add-Ons Ultimate’ that allows to create groups here ( https://prnt.sc/79qG7ScNrEHI ) and that product has such group which is the reason of no-working filter for button text. So after we disabled the plugin text started to work normally -> https://prnt.sc/JddYyJ8S4bBf that means you should contact to plugin’s author and find out why that filter does not work if their plugin is enabled.
Regards
Thank you for your response, I will talk with plugin team
Hello,
You are welcome.
Regards
You must be logged in to reply to this topic.Log in/Sign up