• Hi Admin, I need to change the woocommerce product price according to the location. So I am planning to use Custom field values for different locations as a field in product page. So based on the city name i need to fetch the particular field value. and based on this i need to change the value of the product.

    Could you help me out how can i fetch the value of custom field value in functions.php file.

    waiting for your response eagerly and sooner.

    thanks

Viewing 1 replies (of 1 total)
  • use this filter in your function.php add_filter('woocommerce_add_cart_item_data','call_back_function', 1, 2);
    it will give all fields value you can change and customize its

    function call_back_function($cart_item_data,$product_id){
    //your stuff
    }

Viewing 1 replies (of 1 total)

The topic ‘Fetch field value in functions.php’ is closed to new replies.