Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cinart

    (@cinart)

    Hi Marin,

    I tested your snippet today. It still shows 7,52 € net value. I cleared the cache everytime i did changes to functions.php and loaded the page via ctrl+F5.

    One more info, this role has 8% discount on everything. So, the gross value of 8,95 € is struck-through and the discounted price of 8,23 € is shown. Underneath is the price of 7,52 €, from your plugin. (Just to be clear)

    I tried to find the cause via gemini.
    At some point i checked the DB with SELECT * FROM wp_pph_price_history WHERE price < 8.00
    Only 3 entries showed up and had nothing to do with the product i’m testing with, they pointed to different product-IDs.

    Here is a summary from gemini:

    1. Standard Filter Hook (Priority 10 to 999): We implemented the pph_lowest_price filter using wc_get_price_including_tax.
      • Result: No change. It seems B2B Market filters the price so early or in a way that WooCommerce’s tax engine believes the price is already ‘processed’, returning the net value again.
    2. Manual Tax Calculation: We tried to bypass the WooCommerce price engine by pulling the tax rates manually using WC_Tax::get_rates and adding the tax to the $lowest_price via WC_Tax::calc_tax.
      • Result: Still no change. The displayed value remains the net price (€7.52).
    3. Database Check: We inspected the wp_pph_price_history table. For the product in question, there were no entries for the specific ID, meaning the plugin is correctly falling back to the ‘Inherit from regular price’ logic. However, it seems to pull the ‘net’ version of the regular price when the B2B Market session is active for that user.
    4. Debugging Tax Rates: We added debug logging within the filter. While the filter is being called, the tax rates often return empty or the $product object seems to have lost its taxable status due to the way B2B Market overrides the global product price for that specific user session.

    Current Situation: Even with ‘Inherit from regular price’ enabled, the plugin displays €7.52 (Net) instead of €8.95 (Gross). This is a legal compliance issue for our B2C ‘customer’ group.

    Request: Since the standard pph_lowest_price filter is being overridden or bypassed by B2B Market’s price hooks, do you have:

    • A different hook that fires later in the execution (e.g., a text/HTML filter)?
    • A known way to force the plugin to ignore B2B Market’s price filters when it fetches the ‘regular price’ fallback?

    Hope this info helps. Is there anything else i can do or do you have to check in with B2B Market?

    Best regards



    Thread Starter cinart

    (@cinart)

    Hi,

    Thanks for the reply and help.

    There doesn’t seem to be a public/free version of B2B Market. Maybe they give access to developers, if you request it.

    And yes, i would like to try the custom snippet. Do you need me provide an ID or something?

    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)