Hi @bhranch,
We have documentation on translating WooCommerce text strings here: https://docs.woocommerce.com/document/woocommerce-localization/#section-5
Additionally, I see there’s a code snippet that’ll work for your use case here
I hope that helps!
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 ?
This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.
You can also visit the WooCommerce Facebook group or the #developers
channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.
If you do require more help with the actual coding, we’d recommend you hire a developer who can take a look at this, quote you for their services and help you add this feature to your site. We’d recommend getting in touch with a web developer or one of the customisation experts listed at https://woocommerce.com/customizations/.
Cheers.
Hello Gabriel,
Thank You for you information, I really appreciate it. I have been working on trying to get the button, Praying and the Good Lord helped me get what I needed just now. I did some css coding and got a view & continue button. Here is a screen cap: https://cloud.degoo.com/share/rMVqiikJ-VGlo8eCQA7JjQ
Thanks again & I will keep your information in mind to check out in case I ever need any other help. Have a Blessed rest of the week.
Glad to know that you could figure it out! 🙂
Great! If you have any further questions, you can start a new thread.
Have a great day ahead.