Advertisement
majeedraza

WooCommerce - Change add-to-cart text

Apr 30th, 2020
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. <?php
  2.   // WooCommerce - Change add-to-cart text
  3.   add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_add_to_cart_text' );
  4.   function custom_add_to_cart_text( $default ) {
  5.     if( 'Read more' == $default ) {
  6.       $default = 'View';
  7.     }
  8.     return $default;
  9.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement