Support » Theme: Astra » Change mini cart button text

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @jorgearaujo25,

    Would you please try adding this custom PHP code to your site

    add_filter( 'gettext', function( $translated_text ) {
        if ( 'View cart' === $translated_text ) {
            $translated_text = 'Your new text here';
        }
    	
    	if ( 'Checkout' === $translated_text ) {
            $translated_text = 'Your new text here';
        }
    
        return $translated_text;
    } );

    Please refer to this doc to know how to add custom PHP code in Astra.
    
    If you don’t see the changes after adding the code above, you might want to try to clear the mini-cart cache. Please refer to this GitHub issue.
    
    I hope it helps.

    Kind regards,
    Herman 🙂

    Works! thanks a lot! clearing the cache was necessary

    Cool!

    I am very pleased to know that the code works for you, @jorgearaujo25!

    Please mark the topic as resolved and do let us know if there’s anything else we can help you with.

    Have a nice day and stay safe!

    Kind regards,
    Herman 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.