Change Add to Cart Button Text woocommerce, WordPress.

You Can Change the Common Button ” Add to Cart” with Special text or with an image. You can add “Buy Now”, “Add to Bag”, “Book Now” or “Image” whatever custom text or image you like. This can be done without a Plugin and make the Custom Button.

Step

  • Open WordPress “Admin Panel”, Open theme “Options“.
  • Open “Custom CSS“.
  • Add the below code here. (Note: Add the PNG image in Media and Copy Paste the PNG link in Code.
/* Text ti Pic Add to Cart */ .woocommerce .product .add_to_cart_button.button{ text-indent: -9999px; border-radius: 3px; background-image: url('image url.png'); background-repeat: no-repeat; background-size: contain; margin-left: auto; margin-right: auto; padding: 0px 70px 0px 70px; }

Other Method Step

  • Open You WordPress Admin Page
  • From Sidebar select “Appearance” then “Theme Editor
  • From “Theme Files” select “functions.php
  • Past the below code in function.php.
// To change add to cart text on single product page add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); function woocommerce_custom_single_add_to_cart_text() { return __( 'Buy Now', 'woocommerce' ); } // To change add to cart text on product archives(Collection) page add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_custom_product_add_to_cart_text' ); function woocommerce_custom_product_add_to_cart_text() { return __( 'Buy Now', 'woocommerce' ); }

If this code is not Working then Install the regular Plugin “Code Snippets

Add new “Snippet
Paste the Above Function Code

Developers always try that everything happens without a Plugin because most of the Plugins affect the speed of the Website. So, Everything can be done without Plugins. woocomerce is the best e-commerce store provider and offers you International Store Standards. Filter Skills also contributes with their Clients for best Services and learners for Selective IT Skills.