How to Change View Cart text (1 post)

  1. LesserNoddy
    Posted 3 years ago #

    Hi To All!!
    I am new to wordpress and facing problem in my project ,I am working on a ecommerce project using wootique theme .My problem is that i want to change "VIEW CART" appear under add to cart when product add to cart,
    a message appear view cart ,I want to change that message with my own.

    For the same i use the function

    function my_cart_messages($message)
    		$newmessage = 'Successfully added to Requests';
    		$replacemessage = '<a$1class="button">' . $newmessage .'</a>';
    		$message = preg_replace('#<a(.*?)class="button">(.*?)</a>#', $replacemessage, $message);
    		return $message;
    add_filter( 'woocommerce_add_to_cart_message', 'my_cart_messages', 99);

    but this will only change the message on shop page not entirely.
    still on Featured Products and Recent Products when click to add to cart still show view message.
    i cant figure out how to change this on Featured Products and Recent Products.
    plz help me out for the same as soon as possible,
    Thanks in advance.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic