How to get custom field value in cart page
-
HI,
I am trying to set custom price in add to cart. for this I have used your beautiful plugin for the custom field and getting it work. But I have a custom field called total cost whose value will be the product price after add to cart.
I am not able to get the custom field value on the cart page.
I am using these filter for the custom price.
function change_price_regular_member($price, $product){ // your code will go there for the custom price form custom field total cost please return $price; } add_filter('woocommerce_get_price','change_price_regular_member', 10, 2); add_filter('woocommerce_get_regular_price','change_price_regular_member', 10, 2); add_filter('woocommerce_get_sale_price','change_price_regular_member', 10, 2); add_filter('woocommerce_order_amount_item_subtotal','change_price_regular_member', 10, 2);
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to get custom field value in cart page’ is closed to new replies.