I can change the button link using the woocommerce_return_to_shop_redirect hook, but i cannot find a "nice" way to change the button text.
I would avoid modifying the core file wp-content/plugins/woocommerce/templates/cart/cart-empty.php every time woocommerce gets updated.
Any other ideas?
Thanx.
You can do it this way. I have changed 'shop' to 'store' in the following example.
add_filter( 'gettext', 'change_woocommerce_return_to_shop_text', 20, 3 );
function change_woocommerce_return_to_shop_text( $translated_text, $text, $domain ) {
        switch ( $translated_text ) {
            case 'Return to shop' :
                $translated_text = __( 'Return to Store', 'woocommerce' );
                break;
        }
    return $translated_text;
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With