New Landing How can we help? Cardinal Change 'Add to Cart' text?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Cardinal
  • #246542
    sagemg
    Member
    Post count: 1

    Hi there! I would like to change the text in your “Add to Cart” button to read “Sign Up”. It looks like the theme is overwriting the default WooCommerce filters, so the WooCommerce way of changing that text is not working, and I have not had much success with template files in my child theme. Could you provide me with some insight on how to change that text? For reference, this is the button that can be turned on and off in Theme Options > Woocommerce Options > Shop Options > Standard – Show buy button.

    #246657
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please paste this code at functions.php of child theme.

    function sf_text_strings( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'Add to Cart' :
                             //please put your text;
    			$translated_text = __( 'Put your text', $domain );
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'sf_text_strings', 20, 3 );

    Thanks
    Mohammad

    #246773
    sagemg
    Member
    Post count: 1

    Perfect, thank you!

    #246787
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome and glad to help you.
    Thanks
    Mohammad

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register