add_action('woocommerce_before_calculate_totals', 'custom_change_cart_item_price', 20, 1);
function custom_change_cart_item_price($cart) {
if (is_admin() && !defined('DOING_AJAX')) return;
foreach ($cart->get_cart() as $cart_item_key => $cart_item) {
$new_price = $cart_item['data']->get_price() * 3;
$cart_item['data']->set_price($new_price);
}
}
My wordpress version is 6.6
I have no errors or warnings in the debug.log;
The goal is to temporarily change the prices in a certain context and have the customer complete the order with those prices, without changing the real price of the product
best regards,
]]>I have a problem with the progress bar in the shopping cart.
Everything is working fine, but when a product is added or removed from the cart via the “Quantity” field, the bar does not update.
So if the user came to the cart and had free shipping because it met the requirements, but decides to remove a product and no longer meets the requirements, the progress bar still shows the message “You have free shipping!
Is there a way to update the bar when performing these actions? Even if it forces a reload of the shopping cart instead of the AJAX function.
Also, I wanted to ask if there is a way to keep the progress bar full when the free shipping requirements are met, i.e. the message appears and the full bar below it.
Thanks for your help!
]]>first of all, thank you for creating this wonderful plugin. I just found it recently and totally love it!
Now my hickup:
With Advanced Woo Search active, my cart (in menu) does not update when something is put into it. For example, I click on the homepage on one product, it shows “in the cart (in German of course) but the red dot over the card does NOT change.
When I deactivate AWSearch, all is running again.
Using:
AWSearch 2.57.
Elementor Pro with Hello
(3.6.7 + 3.7.2(pro))
i can get access to cart details in “woocommerce_before_calculate_totals” hook . But i can not manage to update the line_subtotal of a specific product.
Is there any way to do it using “woocommerce_before_calculate_totals” hook ?
If not which hook do i need to use ?
Thanks in advance.
]]>Thanks.
]]>Plugin works great, just one issue: When we change the number of products once, and click the update button, the cart is updated accordingly. When trying to do this a second time on the same page load, the update cart button stays grayed out.
Here is a demo of what happens: https://imgur.com/a/dsZSoE3
The environment is secured, so we are unable to share the link for you to see what happens.
Looking forward to your reply!
Jonathan
]]>I would like to delete the button that is in the cart and it’s called “Actualizar carrito”. Could you tell me how to delete this with a CSS or something?
Image of the cart: https://i.gyazo.com/52b522ea831e87aba363bbdaa9b4bf15.png
URL of my website: https://camisetasmartorell.com
Thanks,
Alberto M.