Hello Sunday,
Thank You for the information, but unfortunately it didn’t work. I have code snippet plugin and put it in there. I tried this code two different ways like the stackoverflow article shows, but it never changed anything. One without the add_filter( ‘woocommerce_get_script_data’, ‘change_view_cart_link’,10,2 ); then one with it. The button on my website still says View Cart & the link is the cart page after I add a product.
This one first:
function change_view_cart_link( $params, $handle )
{
add_filter( 'woocommerce_get_script_data', 'change_view_cart_link',10,2 );
switch ($handle) {
case 'wc-add-to-cart':
$params['i18n_view_cart'] = "Continue Shopping"; //change Name of view cart button
$params['cart_url'] = "https://www.mywebsite.com/store/"; //change URL of view cart button
break;
}
return $params;
}
__________________________________
Then This one with added hook like article showed:
function change_view_cart_link( $params, $handle )
{
switch ($handle) {
case 'wc-add-to-cart':
$params['i18n_view_cart'] = "Continue Shopping"; //change Name of view cart button
$params['cart_url'] = "https://www.mywebsite.com/store/"; //change URL of view cart button
break;
}
return $params;
}
What can I do to get the button to change from View Cart to Continue Shopping and the link go back to my store page ?