WP Manifestindependent plugin directory
manifest / ecommerce / wwp-tm-epo-price-display-compatibility

WWP + TM EPO Price Display Compatibility

Fixes double-discounted wholesale prices on single product pages when WooCommerce Wholesale Pricing and TM Extra Product Options are used together. * Version: 0.2.0

by Muhammad Jawad Arshad · github.com/muhammad-jawad/wwp-tm-epo-price-display-compatibility

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/muhammad-jawad/wwp-tm-epo-price-display-compatibility/archive/refs/heads/main.zip

Readme

WWP + TM EPO Price Display Compatibility

Fixes double-discounted wholesale prices on WooCommerce single product pages when WooCommerce Wholesale Pricing and TM Extra Product Options (EPO) are used together.

🧩 Problem

When using both plugins:

Wholesale discounts are applied globally by the Wholesale Pricing plugin. TM EPO recalculates prices for display and totals. This can cause double discounting, resulting in incorrect (lower-than-expected) prices on: Single product pages Variation selections TM EPO totals box ✅ Solution

This plugin ensures:

Wholesale pricing is applied once and consistently Prices displayed across WooCommerce and TM EPO are synchronized Correct price is used for: Product display Variation pricing AJAX requests TM EPO totals ⚙️ Features Prevents duplicate discount application Supports: Simple products Variable products Variations Handles all wholesale pricing levels: Group pricing Product tier pricing Product-level discounts Category pricing Global pricing Works with: Logged-in wholesale users Guest wholesale pricing (if enabled) Maintains proper “Sale” display with percentage savings Ensures idempotent pricing (same input → same output) 🔌 Requirements WordPress WooCommerce WooCommerce Wholesale Pricing plugin TM Extra Product Options plugin 📦 Installation

Create a new plugin file:

wwp-tm-epo-compatibility.php Paste the provided PHP code into the file.

Upload to:

/wp-content/plugins/ Activate the plugin from WordPress admin. 🚀 How It Works

  1. Detects Wholesale Context

The plugin checks:

If the current user is a wholesaler Or if guest wholesale pricing is enabled 2. Calculates Correct Wholesale Price

It evaluates pricing in priority order:

Group tier pricing Product tier pricing Product-level pricing Category tier pricing Category-level pricing Global tier pricing Global pricing 3. Overrides WooCommerce Price Hooks

It intercepts WooCommerce filters:

woocommerce_product_get_price woocommerce_product_variation_get_price woocommerce_product_get_regular_price

This ensures:

Prices are corrected before display No double discounting occurs 4. Fixes Variation & AJAX Pricing

Hooks into:

woocommerce_available_variation

Ensures:

Correct variation prices in dropdowns Accurate pricing in AJAX responses 5. Fixes TM EPO Totals

Hooks into:

wc_epo_template_args_tm_totals

Ensures:

TM EPO totals box uses correct wholesale prices Variation price maps are accurate 6. Correct Price Display

Overrides:

woocommerce_get_price_html

Ensures:

Proper sale formatting Accurate "Save %" display 🧠 Key Concept

The plugin enforces idempotent pricing:

The same product price will not be recalculated or discounted multiple times.

⚠️ Notes Only affects frontend product display and AJAX Does not modify stored prices Safe to use alongside existing pricing rules Leaves variable “From” price intact on archive pages 👤 Author

Muhammad Jawad Arshad

📄 License

This plugin follows standard WordPress licensing (GPL compatible).

Read the full README on GitHub →