Programmatic cart item price manipulation

[ad_1]

foreach ($cart->get_cart() as $cart_item) {
if (isset($cart_item['pricing_custom)
{$cart_item['data']->set_price($cart_item['data']->get_price() + $cart_item['pricing_custom']);
}
}

We add some custom add-ons for products and then add to the item price in Woocommerce cart. But it does not set the price for Wholesale users. How do we access and set the price in Wholesale user case?

  • This topic was modified 5 hours, 36 minutes ago by bmaggot.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer