Thank you very much. I knew your code would work once I started your video. Tried multiple before and none worked :) Now I will search for change button color. All the best
to change button color just simply custom css , if you using elementor started with .selector .(class) { background : Black ( or your color ) ; } or you want to add some round button just simply add property border-radius: ... px;
Hi, When I click add to cart, a kind of animation occurs and view cart link is display next to the add to cart, is it possible to edit the look of the view cart link and also change the onclick animation of add to cart button, I have been trying for an entire day but couldn't come up with a solution. Any hint / idea would be of great help ! Thanks
Hi, do you have a tip as well, on how to change the link of the shop buttons and their text (as mine have different texts for some reason..or can I in that case use this method here as well?). The first button displayed links directly to the cart, the next buttons (button text "read further") link to the individual product pages.. Thank you for your help!
what if I want to add a "view product" button on the product listing page and when someone clicks the view product button then I will show the buy now/add to cart button?
i added this code from theme editor>function.php at the bottom but now that page is not editing with elementor it says 'preview could not be loaded' should I add it from code snippet will it solve the problem?
Thank you for the tutorial, it works well. Could you please also provide the code snippet for changing "View Cart"(Appears to me when I click on the Basket Icon on the navigation) + "Continue Shopping"(That shows on Checkout Page) + "Checkout"(Appears to me when I click on the Basket Icon on the navigation) button texts? I sort of got the process of creating the code watching your video, but wanted to be on the safe side still :) Thanks alot!
@@Mr_Web Hello David, thank you very much for your prompt reply and all the infos. I have a few more customizations needs, should I send an email here; hello@mrwebreviews.com ? Best,
add_filter( 'woocommerce_checkout_coupon_message', 'mrweb_have_coupon_message'); function mrweb_have_coupon_message() { return ' Have a coupon? Click here to enter your discount code'; }
@@Mr_Web Thanks for your prompt reply. That works for the Top String but under that I also need to change the Text Place Holder "Coupon code" and the "Apply coupon" Button.
My button says Buy Now and I want it to say Add To Cart 😅 I changed the Buy Now to Add To Cart as you mentioned in your video however it's not changing after refreshing. Should I change anything else in the Code? I've also tried to change the add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); to add_filter( 'woocommerce_product_single_buy_now_text', 'woocommerce_custom_single_buy_now_text' ); and still doesn't work 😓 Thank you Mr Web Reviews 🤗
Great video! I am looking to change text on a product page, where do i find the code to change? I have a deposit plugin on and the text reads Pay a deposit of £99.00 per item I would like it to read Pay a deposit of £99.00 per item subject to t&cs
Hi, thank you for the video! I want to make all the letters capitalized in Woocommerce buttons. I followed your video for the Buy Now button. How do I change the Apply Coupon and Update cart buttons? I want everything to be uniform on the site.
Geat Video and easy to follow; I am trying to find a similar code that will encourage visitors to login before they get prices so button will show 'Learn More' on the shop page, and link to the Product page where 'Buy Now' will only show price on the cart visitor is logged in. Is that possible?
add_filter( 'woocommerce_order_button_text', 'mrwebreviews_custom_button_text' ); function mrwebreviews_custom_button_text( $button_text ) { return 'Submit'; // new text is here }
Thank you very much. I knew your code would work once I started your video. Tried multiple before and none worked :) Now I will search for change button color. All the best
Thanks, that's very kind of you 👍
to change button color just simply custom css , if you using elementor started with .selector .(class) { background : Black ( or your color ) ; } or you want to add some round button just simply add property border-radius: ... px;
Thank you, it worked so well. From the way your video started, I could immediately tell I was watching the right video.
Excellent one. I did it within 2 mins after seeing your video instructions.. Thanks a lot.
Great job!
Thank you! I was looking for a fix for this for hours now.
Glad I could help!
Hi, When I click add to cart, a kind of animation occurs and view cart link is display next to the add to cart, is it possible to edit the look of the view cart link and also change the onclick animation of add to cart button, I have been trying for an entire day but couldn't come up with a solution. Any hint / idea would be of great help ! Thanks
It was great help for me. Thanks
Thank you so much sir I was stuck with some of my buttons saying learn more and buy now😩 I didn’t know what to do😊🌺Thank You so much!
Thanks so much for this!!! Great presentation, and I've been looking for this solution for a long time!!!
It worked 100%, thank you
That was Wonderful. It saved me alot of data and time. A lot of dead end solutions on the web from Phishers on an Expedition. Bless you
Thanks man, this is so helpful
Thanks a lot! works like a charm
Thank you so much, if i want to change pay for order button in plugin WooCommerce MPGS please?
Hi, do you have a tip as well, on how to change the link of the shop buttons and their text (as mine have different texts for some reason..or can I in that case use this method here as well?). The first button displayed links directly to the cart, the next buttons (button text "read further") link to the individual product pages.. Thank you for your help!
Thanks! Worked as shown!
Glad it helped 💯
It works! thanks a lot .... you earned a new sub +
Thanks for the sub!
what if I want to add a "view product" button on the product listing page and when someone clicks the view product button then I will show the buy now/add to cart button?
To make the "Add to Cart" button in WooCommerce remain static and not change when hovered over,
i added this code from theme editor>function.php at the bottom but now that page is not editing with elementor it says 'preview could not be loaded' should I add it from code snippet will it solve the problem?
Yes use code snippet much easier
@@Mr_Web ok will try it
Thank You so much. I was so hopples. And You gave me the solution 👏
thx, man how can i do that to put afiliate link to amazon
Thank you.
You're welcome!
I need a way to change the text of the coupon code that says "Apply". How can I reference to this button when using a code snippet???
how do you change the colour of the bottons?
Awesome tutorial.
Thank you!
How is it that i have "add to basket" How to i change that to "add to cart" ?
Thank you so much, this video was very helpful
Great and how did you manage to put the add to cart button on in the listing page ? Is it possible with Divi
Thank you so much for great learning video!!! Keep doing great work!!!
Thanks 🙏
Great video! How to set the radius and fontname and fontsize?
Thank you for the tutorial, it works well. Could you please also provide the code snippet for changing "View Cart"(Appears to me when I click on the Basket Icon on the navigation) + "Continue Shopping"(That shows on Checkout Page) + "Checkout"(Appears to me when I click on the Basket Icon on the navigation) button texts? I sort of got the process of creating the code watching your video, but wanted to be on the safe side still :) Thanks alot!
// CHANGE VIEW CART
add_filter( 'gettext', function( $translated_text ) {
if ( 'View cart' === $translated_text ) {
$translated_text = 'Your new text here';
}
return $translated_text;
} );
// CHANGE CONTINUE SHOPPING BUTTON TEXT
add_filter( 'woocommerce_continue_shopping_redirect', 'my_changed_woocommerce_continue_shopping_redirect', 10, 1 );
function my_changed_woocommerce_continue_shopping_redirect( $return_to ){
$return_to = wc_get_page_permalink( 'checkout' );
return $return_to;
}
add_filter( 'wc_add_to_cart_message_html', 'my_changed_wc_add_to_cart_message_html', 10, 2 );
function my_changed_wc_add_to_cart_message_html($message, $products){
if (strpos($message, 'Continue shopping') !== false) {
$message = str_replace("Continue shopping", "Go to checkout", $message);
}
return $message;
}
// CHANGE CHECKOUT BUTTON TEXT
add_filter('gettext', 'change_checkout_btn');
add_filter('ngettext', 'change_checkout_btn');
function change_checkout_btn($checkout_btn){
$checkout_btn= str_ireplace('Checkout', 'Your New Text', $checkout_btn);
return $checkout_btn;
}
@@Mr_Web Hello David, thank you very much for your prompt reply and all the infos. I have a few more customizations needs, should I send an email here; hello@mrwebreviews.com ? Best,
This video was helpful.
Great!
Hey, this code is not changing add to cart button on shop page but changing it on single product page, Please help me out
Thank you!! this was so fast and easy, I like your tutorial style
Glad it was helpful!
What would be the snippet to change "Coupon Code" to "Referral Code"?
add_filter( 'woocommerce_checkout_coupon_message', 'mrweb_have_coupon_message');
function mrweb_have_coupon_message() {
return ' Have a coupon? Click here to enter your discount code';
}
@@Mr_Web Thanks for your prompt reply. That works for the Top String but under that I also need to change the Text Place Holder "Coupon code" and the "Apply coupon" Button.
@@webadvltd
This should work for ALL coupon text instances:
add_filter( 'gettext', 'mrweb_rename_coupon_field_on_cart', 10, 3 );
add_filter( 'woocommerce_coupon_error', 'mrweb_rename_coupon_label', 10, 3 );
add_filter( 'woocommerce_coupon_message', 'mrweb_rename_coupon_label', 10, 3 );
add_filter( 'woocommerce_cart_totals_coupon_label', 'mrweb_rename_coupon_label',10, 1 );
add_filter( 'woocommerce_checkout_coupon_message', 'mrweb_rename_coupon_message_on_checkout' );
function mrweb_rename_coupon_field_on_cart( $translated_text, $text, $text_domain ) {
if ( is_admin() || 'woocommerce' !== $text_domain ) {
return $translated_text;
}
if ( 'Coupon:' === $text ) {
$translated_text = 'Voucher Code:';
}
if ('Coupon has been removed.' === $text){
$translated_text = 'Voucher code has been removed.';
}
if ( 'Apply coupon' === $text ) {
$translated_text = 'Apply Voucher';
}
if ( 'Coupon code' === $text ) {
$translated_text = 'Voucher Code';
}
return $translated_text;
}
function mrweb_rename_coupon_message_on_checkout() {
return 'Have a coupon code?' . ' ' . __( 'Click here to enter your code', 'woocommerce' ) . '';
}
function mrweb_rename_coupon_label( $err, $err_code=null, $something=null ){
$err = str_ireplace("Coupon","Voucher Code ",$err);
return $err;
}
@@Mr_Web Now the ability to click on "Click here to enter your code" is not linked
You are the man!!! Thank you so much.. I wanted to ask if there is a way to add an icon on the button using a code.
CREATE A FILTER:
add_filter( 'woocommerce_product_single_add_to_cart_text', 'mrweb_add_symbol_add_cart_button_single' );
function mrweb_add_symbol_add_cart_button_single( $button ) {
$button_new = '» ' . $button;
return $button_new;
}
ADD CUSTOM CSS CODE:
button.single_add_to_cart_button:before {
display: inline-block;
font-family: FontAwesome;
float: left;
content: "\f217";
font-weight: 300;
margin-right: 1em;
}
Thank you, it worked for me. How can I change the update cart text?
function change_update_cart_text( $translated, $text, $domain ) {
if( is_cart() && $translated == 'Update cart' ){
$translated = 'New Text Here';
}
return $translated;
}
add_filter( 'gettext', 'change_update_cart_text', 20, 3 );
@@Mr_Web its working form me thank you so much.
Thanks you.. but how can i do this for the translation as well?
Worked, after I disabled Boost. Thanks.
thank you it work perfect ^^
My button says Buy Now and I want it to say Add To Cart 😅 I changed the Buy Now to Add To Cart as you mentioned in your video however it's not changing after refreshing. Should I change anything else in the Code? I've also tried to change the
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' );
to
add_filter( 'woocommerce_product_single_buy_now_text', 'woocommerce_custom_single_buy_now_text' );
and still doesn't work 😓 Thank you Mr Web Reviews 🤗
Very helpful, thanks!
Thank you so much it worked, can you also tell me when I click that button ,Hunter that button comes view CART how can I turn it off?
Sorry can you rephrase that please 👉 "that button comes view CART" ❓ I'm not too sure what you mean by that 🤔
Thanks 🤩
Great! Thank You! Help me a lot!
Glad to hear that!
Great video! I am looking to change text on a product page, where do i find the code to change? I have a deposit plugin on and the text reads Pay a deposit of £99.00 per item I would like it to read Pay a deposit of £99.00 per item subject to t&cs
how if want to add buy now button without erasing add to cart button
Thanks a lot. It's very heplful.
Glad it was helpful!
Thanks man, Suscribed
how can i change the size of add to cart
This is changing to all capital letters, I want only the first letter to be capital not all the words. Please help.
Thank you very much sir
It's works. thank you very much :)
Yay! Glad it worked for you 👍
Hi, thank you for the video! I want to make all the letters capitalized in Woocommerce buttons. I followed your video for the Buy Now button. How do I change the Apply Coupon and Update cart buttons? I want everything to be uniform on the site.
You'll need to apply some CSS coding to these elements. Use this line of code:
text-transform: capitalize;
LOVELY, THANKS !
Thank you too!
thnks god finally find it
Hello, please is it possible to change the add to a text with a different link? Like "Send Inquiry" with a link to the contact form.
wordpressdeveloperonline.com/add-to-cart-button-change-to-enquiry-button-linking-to-the-contact-us-page/
THANKS FOR THE VIDEO.
PLEASE HOW CAN I RENAME "VIEW CART"?
add_filter( 'gettext', function( $translated_text ) {
if ( 'View cart' === $translated_text ) {
$translated_text = 'Your new text here';
}
return $translated_text;
} );
Thank you so much
Geat Video and easy to follow; I am trying to find a similar code that will encourage visitors to login before they get prices so button will show 'Learn More' on the shop page, and link to the Product page where 'Buy Now' will only show price on the cart visitor is logged in. Is that possible?
www.businessbloomer.com/woocommerce-hide-price-add-cart-logged-users/
hi , is there a code to change 'Place Order' button on the checkout page ?
add_filter( 'woocommerce_order_button_text', 'woo_custom_order_button_text' );
function woo_custom_order_button_text() {
return __( 'Your new button text here', 'woocommerce' );
}
it works - thank you 👍
Great! Glad to hear that...
iam nikhil from india sir your video is very very helpful , and how to change checkout now button name
njengah.com/woocommerce-change-checkout-button-text/
How to change 'checkout' button text in mini cart
Sir, this will not impact the link inside
No
Hi, thank you for this video. By any chance do you also have a code to change a text on a checkout button? It would be very helpful as well.
add_filter( 'woocommerce_order_button_text', 'mrwebreviews_custom_button_text' );
function mrwebreviews_custom_button_text( $button_text ) {
return 'Submit'; // new text is here
}
@@Mr_Web thank you!!! You are a star!!!
Thank you, man!
You're welcome 😁
tks so much... ☺☺
I cloud no find in your discaption in php code it’s need
Thank you very much!
No thanks you for watching my videos and taking the time to leave a comment 👍
thank you , you help a lot
Happy to help
Thank you!
You're welcome!
Not working i am using astra theme please help
Doesn't matter if it's Astra. This works with any theme. Check if you got the code right
button dimension change please
thanks
sir this code not works on express shop plugin
Only WooCommerce
thank you for this...
You're welcome 😊
Thx from indo brooo, thanks
You're welcome, glad to be of help 😂
Thanks
Nice videp
How can i change link in this button?
What? The link is to add the product to the cart, why would you want to change that???
thank you
You're welcome
nice content
May God bless you. Amen
Thank you 👍
Its not working now
I CANT FINE THE CODE IN THE COMMENT SECTION
Not working
Hello! Where is that code?
In the description
@@Mr_Web but how to redict from ad to cart to checkout page? It is stil view card ?
not working.. your code
i love you
Merci infiniment
Thanks a Lot ★★★★★
Watch next 👉 th-cam.com/video/jWWB0DOD2Zs/w-d-xo.html
شخص رائع
I had to use Google translate 😎 Thanks
Thanks!
I just got your code to work. Super Thanks!
Thanks so much for this!!! Great presentation, and I've been looking for this solution for a long time!!!
Glad it was helpful!
Thank you very much sir
thank you soooooo much
Thank you
You're welcome
Thank you!