Hi,
There are a few cart notices from YITH Themes that print at the top of the cart and checkout page.
Can you help me move them to another location. preferably to woocommerce_cart_collaterals and woocommerce_checkout_after_customer_details
I’d like to leave the “Returning Customer” message at the top.
The YITH developer gave me a bit of code to try, but it didn’t work:
function move_woocommerce_message(){
remove_action( 'woocommerce_before_cart', 'wc_print_notices', 10 );
add_action( 'woocommerce_cart_collaterals', 'wc_print_notices', 35 ); }
add_filter('wp', 'move_woocommerce_message');
He says they are defined in the cart.php file:
https://snag.gy/a0Io2T.jpg
Any help would be appreciated! Thanks!
Hello,
You sent screenshot from the checkout page but you are talking about cart page. Let’s clear the situation: code does not work for the cart page or for the checkout page?
Because cart page code won’t work for the checkout page.
Regards
Here is screenshot of cart too:
https://snag.gy/Brvljh.jpg
Hello,
We are not sure if the code you get from the previous developer works even for the default theme.
To move notices on the cart page add the following code in child theme functions.php
function move_woocommerce_message(){
add_action( 'woocommerce_cart_coupon', 'wc_print_notices', 35 ); }
add_filter('wp', 'move_woocommerce_message');
Then copy file xstore/woocommerce/cart/cart.php into child theme and comment out the line from screenshot http://prntscr.com/epxve0
If you need any other additional customization, please, contact customization team because theme support does not includes additional customization service.
Regards
Hello,
Files should be paced in wp-content/themes/xstore-child/woocommerce/cart/cart.php + code into child theme functions.php (wp-content/themes/xstore-child/functions.php).
Regards
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.
The message was successfully sent
Your shopping cart is empty
You may extend support period on ThemeForest and then update its status by clicking "Update" button in your Account area.
Purchase code | Expiration date |
---|---|
adb2cf8c-15ed-4d7a-a406-790658a81a6c | 03 Dec 2019 |