• hi,
    i am using a template page which retrieves data from different ACF fields in the product page, and i wanted to know if it is possible to get the content of the tiered pricing like i pull other meta data (i have 2 different quanitites)?
    if so, what are their names / how to query them?

    thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Mykola Lukin

    (@bycrik)

    Hi,

    Yes, you can get it in 2 options:

    1) Use low-level metadata (not recommended):

    $rules = get_post_meta({POST_ID}, '_fixed_price_rules', true);

    and percentage for premium version:

    $rules = get_post_meta({POST_ID}, '_percentage_price_rules', true);

    2) Use plugin priceManager (recommended):

    
    $rules = \TierPricingTable\PriceManager::getPriceRules( $product_id );
    
    $price = \TierPricingTable\PriceManager::getPriceByRules( $qty, $product_id, 'cart' );

    Hope that makes sense for you.

Viewing 1 replies (of 1 total)

The topic ‘retrieving discount data (using meta name)’ is closed to new replies.