Good day, @ox173
It does modify the subtotal in the cart as well. Is there a way to only modify the price and not subtotal?
Try this
add_filter('woocommerce_cart_item_price', function ($price, $cart_item, $cart_item_key) {
$product = apply_filters('woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key);
$adpSetDecimals = function () {
return 3;
};
add_filter("wc_get_price_decimals", $adpSetDecimals, 10);
$price = WC()->cart->get_product_price($product);
remove_filter("wc_get_price_decimals", $adpSetDecimals, 10);
return $price;
}, 10, 3);
In the backend, Woocommerce/orders once the order is clicked on there is the sub headings
Item-Cost-qty-total-tax
The part that is cost, I would like only to have 5 decimal places.
It makes no sense because the price in the order has already been rounded