How to display a custom product field value of a specific category on a Woo Commerce checkout page?
Try something like this, I am unable to test this at the moment. add_action(‘woocommerce_before_calculate_totals’, ‘personalization_check_category_in_cart’); function personalization_check_category_in_cart() { // loop through all products in the Cart foreach (WC()->cart->get_cart() as $cart_item) { // if cart has category term, set variable $cat_in_cart to true if (has_term( ‘Personalize’, ‘product_cat’, $cart_item[‘product_id’])) { $product = $cart_item[‘data’]; // get product data … Read more