Kung Woo Price History for WooCommerce

Description

Kung Woo Price History for WooCommerce is a lightweight WooCommerce extension that automatically tracks price changes and displays the lowest price from the last 30 days (complying with the EU Omnibus Directive).

Additionally, it allows your customers to view the full product price history on a beautiful, interactive modal chart, and even export that chart as a PDF file.

Features

  • Omnibus Compliance: Automatically calculates and displays the lowest product price from the last 30 days whenever a product is on sale.
  • Price Tracking: Silently records the product price every time it gets updated or saved in the WooCommerce backend.
  • Interactive Chart: Adds a sleek “Price History” button to single product pages (via hook or shortcode) that opens a modal with a responsive Chart.js line graph.
  • PDF Export: Allows customers to generate and download a PDF report of the price chart with one click.
  • Page Builder Friendly: Works flawlessly with Elementor and other page builders thanks to robust event delegation and global script enqueuing.
  • Strict Security & Performance: Fully compliant with WordPress.org repository guidelines. No external CDN calls, strict data sanitization, English-only database keys, and properly enqueued scripts.

Screenshots

Installation

  1. Upload the entire plugin folder to the /wp-content/plugins/ directory, or install it directly via the WordPress plugins screen.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. The plugin will immediately start tracking price changes for your products.
  4. When a product is put on sale, the “Lowest price in 30 days” notice will automatically appear.
  5. A “Price History” button will be added to your single product pages. You can also use the plugin’s shortcode [kwph_price_history] to place the button anywhere on the product page or within your Elementor templates.

FAQ

When does the plugin record a new price?

The plugin hooks into the WooCommerce product save action. Whenever you update a product and the price differs from the last recorded entry, it logs the new price along with today’s date.

Can I import historical data?

Currently, the plugin begins tracking prices from the moment it is installed and activated. It does not look back at past WooCommerce logs.

Where is the Omnibus notice displayed?

The lowest price from the last 30 days is automatically displayed right under the product price summary, but only when the product is currently “on sale”.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Kung Woo Price History for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.8

  • Refactor: Standardized all database keys, options, and variables to English (e.g., _kwph_price_history) to meet WordPress.org global standards.
  • Compatibility: Added full support for Elementor and other Page Builders by implementing global script enqueuing and JavaScript Event Delegation.
  • Architecture: Shortcode buttons now securely carry specific product data via data-chart attributes, enabling multiple distinct charts to work flawlessly on the same page.
  • Fix: Resolved a major Chart.js rendering issue (blank chart modal) by enforcing explicit canvas wrapper heights and applying rendering cycle delays.
  • Fix: Added visual fallback error messages to gracefully handle missing core JavaScript assets.

1.0.1

  • Security: Implemented strict SVG sanitization using wp_kses() with an explicit allowlist for the settings page.
  • Security: Improved late escaping across all plugin outputs.
  • Architecture: Moved all inline JavaScript from footer directly to correctly enqueued external JS files using wp_enqueue_script and wp_localize_script.
  • Architecture: Prefixed shortcodes ([kwph_price_history]) and global declarations to avoid naming collisions.
  • Update: Updated Chart.js to the newest stable version.
  • Fix: Removed remote CDN calls from the html2pdf library to ensure all assets are loaded locally.
  • Compliance: Renamed plugin to respect third-party trademarks (“for WooCommerce”).

1.0.0

  • Initial release.