Troubleshooting
Price history is not being recorded
Section titled “Price history is not being recorded”Module is not active
Section titled “Module is not active”- Go to WPify → WPify Woo
- Verify that the Prices log module is enabled
- Save changes
Price has not changed
Section titled “Price has not changed”The module only records price changes. If the price is the same as the last recorded entry, a new entry will not be created.
Check:
// Last entry has the same price as the current one$last = $repository->get_last_by_product_id( $product_id );if ( $last->regular_price === $product->get_regular_price() && $last->sale_price === $product->get_sale_price()) { // New entry will not be created}Product was not saved
Section titled “Product was not saved”History is recorded when the product is saved. If you change the price directly in the database or via API without triggering woocommerce_update_product, the entry will not be created.
Lowest price is incorrect
Section titled “Lowest price is incorrect”Missing historical data
Section titled “Missing historical data”The module starts recording prices only after activation. Data from before activation does not exist.
Solution:
- For existing products, edit and save the price to create the first entry
- Or wait for a natural price change
Displays current price
Section titled “Displays current price”If the product has no historical records from the last 30 days, the current price of the product will be displayed.
$price = $repository->find_lowest_price( $id ) ?: 0;if ( ! $price ) { // Fallback to current price $price = wc_get_product( $id )->get_price();}”Prices log” tab is empty
Section titled “”Prices log” tab is empty”New product
Section titled “New product”A new product does not have any entries yet. Entries will be created after the first price change.
Variable product
Section titled “Variable product”For variable products, entries are saved for each variation separately. The tab displays tables for each variation.
Database issues
Section titled “Database issues”Table does not exist
Section titled “Table does not exist”When the module is activated, a database table is automatically created. If the table is missing:
- Deactivate the module
- Reactivate the module
- Check whether WordPress has permissions to create the table
Errors when saving
Section titled “Errors when saving”Check the WordPress error log:
wp-content/debug.logDiagnostics
Section titled “Diagnostics”Checking product data
Section titled “Checking product data”// In the product admin or debug plugin$repository = wpify_woo_container()->get( \WpifyWoo\Modules\PricesLog\PricesLogRepository::class);
$logs = $repository->find_by_product_id( $product_id );echo '<pre>';print_r( $logs );echo '</pre>';Checking lowest price
Section titled “Checking lowest price”$prices_log = wpify_woo_container()->get( \WpifyWoo\Modules\PricesLog\PricesLogModule::class);
$lowest = $prices_log->get_lowest_price( $product_id );echo 'Lowest price: ' . wc_price( $lowest );Performance
Section titled “Performance”Large number of entries
Section titled “Large number of entries”For products with frequent price changes, the table may grow. The module does not include automatic cleanup of old entries.
Manual cleanup (optional):
-- Delete entries older than 90 daysDELETE FROM wp_wpify_woo_prices_logWHERE created_at < DATE_SUB(NOW(), INTERVAL 90 DAY);