REST API
The WooCommerce REST API (/wp-json/wc/v3/products and variations) returns an omnibus object for every product:
"omnibus": {
"lowest_price": "49.99",
"days": 30,
"is_reduced": true,
"genuine_discount": true,
"discount_percent": 20,
"notice": "Lowest price in the 30 days before the discount: €49.99"
}
WP-CLI
wp cartnorm seed # record the current price of every product now
wp cartnorm show <id> # show the history and reference of a product
wp cartnorm import <source> # iworks or wc_price_history
wp cartnorm prune # remove expired history now
Filters
cartnorm_reference_price— change the calculated reference.cartnorm_notice_html— change the notice markup.cartnorm_should_display— decide per product whether to show anything.cartnorm_display_info— adjust or hide the display data (returnnullto hide).cartnorm_country_rules— adjust the country profiles.cartnorm_settings— adjust settings at runtime.
Actions
cartnorm_history_corrected— after a record was corrected or voided ($history_id,$action).cartnorm_loaded— after the plugin has loaded.
Data
History is stored in the table {prefix}cartnorm_history, corrections in {prefix}cartnorm_audit. Both are removed when the plugin is uninstalled.
Something unclear or missing? Write to [email protected].