• Hello,

    I need to change the price values globally, i have a 2 fields for price one for non members and another for members ( _pricr and _price_member) so i need to change the price values according to the user logged in or not. I already done the database sections .
    Now i only need to know that how can i change the price values globally may be using some hooks.

    I tried to use this filter
    add_filter('woocommerce_get_price', 'managePrice', 1, 2);
    and determines price values according to post id but it only works on details page other page not working not working on cart page.

    Please anyone have any idea about it

    Thank you

    https://www.ads-software.com/extend/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • filters will only affect what the price is displayed as, and not what the price actually is (in the cart). There is a set_price() function on the product class, but I haven’t been successful in using this. What I have done is to dynamically generate a coupon for each product when it is added to the cart to make the price what I want it to be.

    as for display, the filter you want to use is woocommerce_get_price_html

    Thread Starter hridaya

    (@hridaya)

    Hello,
    Thanks @bheadrick

    I need to display 2 price based on logged in members or not logged in members globally ie, display as well as on cart checkout everywhere.

    I used woocommerce_get_price_html filter as well but not works all the place .

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need to change Price Values’ is closed to new replies.