Support » Plugin: Price Based on Country for WooCommerce » Get the current Zone

  • Resolved brodde

    (@brodde)


    Hi i used this function before to retrive the current zone

    WCPBC()->customer->zone_id

    Is this changed, after the last update this no longer works?

Viewing 1 replies (of 1 total)
  • Plugin Author Oscar Gare

    (@oscargare)

    Hi,
    the customer object is deprecated.

    Since version 1.8 you can get the current zone by the function wcpbc_the_zone()

    wcpbc_the_zone returns the current WCPBC_Pricing_Zone object or false if there is no pricing zone that matches with the customer country.

    wcpbc_the_zone()->get_zone_id();

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.