Most errors reported with Pricepep (formerly WooCommerce Dynamic Pricing & Discounts) are fixed in versions 2.5, 2.5.2 and 2.6.0. Find your message or symptom below, check your version on the Plugins page, and update: see how to keep Pricepep up to date. Where to find the full message is in PHP warnings and errors.
Which version fixed my error?
Messages are given as PHP 8 prints them. PHP 7 words some of them differently, for example Undefined index: key for Undefined array key "key".
| Message or symptom | Cause | Fixed in |
|---|---|---|
Fatal error Call to a member function get_applied_coupons() on null | Another plugin loaded a cart discount by its code where there is no cart, for example while listing orders through the REST API (reported with Smart Coupons), with Apply with individual use coupons turned off | 2.6.0 |
Fatal error Call to a member function get_price() on null in the cart | Another plugin left an entry without a product in the cart | 2.6.0 |
Fatal error Call to a member function generate_cart_id() on null | Prices read where there is no cart, for example by a product feed built in WP-Cron | 2.6.0 |
Fatal error Class "RightPress_Product_Price_Cart" not found | A payment plugin created the order or checked coupons before WordPress had finished loading (reported with Moneris Checkout) | 2.6.0 |
Fatal error Cannot redeclare ... | WP-CLI run from inside the folder of another copy of the plugin | 2.6.0 |
Fatal error Division by zero on the page of a product priced 0 | The volume pricing table set to show percentages | 2.6.0 |
Fatal error RightPress Condition: Product is not defined. | Another plugin read the price of a product that isn't saved, while a product pricing rule had a product condition | 2.5.2 |
Fatal error at checkout, Too few arguments to function RP_WCDPD_Method_Product_Pricing_Other_Restrict_Purchase::woocommerce_product_variation_is_visible() | Another plugin checks whether a variation is visible with three arguments, while a Restrict purchase of matched products rule exists | 2.5.2 |
Fatal error Cannot unset string offsets in WP-CLI, WP-Cron or other background tasks, with WooCommerce 10.7 on PHP 8.3 | An invalid Store API cart schema | 2.5.2 |
Undefined array key "line_subtotal" or "line_subtotal_tax" | Cart item subtotal conditions checked before WooCommerce had calculated the line subtotals | 2.6.0 |
foreach() argument must be of type array|object, null given | A Bulk pricing or Tiered pricing rule saved without quantity ranges | 2.6.0 |
Array to string conversion | List conditions with nested values | 2.6.0 |
Attempt to read property "applied_coupons" on false | Shop prices read where there is no cart, with the shop price cache skipped or turned off | 2.6.0 |
Undefined array key "variation_attributes" | A variation selector, such as a swatches plugin, updated prices without sending the variation's attributes | 2.6.0 |
| A PHP warning for each option, and no results, when you search in a condition | Search text containing "/" | 2.6.0 |
Translation loading for the woocommerce domain was triggered too early (WordPress 6.7 and later, with taxes enabled) | Pricepep's settings asked for WooCommerce's name of the standard tax rate too early | 2.6.0 |
Translation loading for the rp_wcdpd domain was triggered too early (WordPress 6.7 and later) | Pricepep loaded its own translations too early | 2.5.2 |
Undefined array key "key" | Other plugins passing incomplete cart items | 2.5.2 |
Creation of dynamic property ... is deprecated, for example for RightPress_Updates_7119279::$plugin_version or WC_Product_Simple::$rightpress_in_cart | PHP 8.2 and later | 2.5 |
Implicit conversion from float ... to int loses precision | The Countdown Timer's time calculation, on PHP 8.1 and later | 2.5 |
Attempt to modify property "response" on null (or "no_update") | The update check received no update data | 2.5 |
A notice that is_ajax is deprecated | Pricepep used WooCommerce's is_ajax() | 2.4.4 |
| The Settings tab stays on "User Interface Loading" | Another plugin or a script optimizer removed the Select2 script that comes with Pricepep | 2.6.0 |
| The rule editor stays on "User Interface Loading" | The plugin folder is a symlink to a folder with another name, so Pricepep's styles and scripts didn't load | 2.6.0 |
| The rule editor doesn't load when you open a rule from a link | An unexpected rule ID in the address | 2.6.0 |
| Saving deleted every rule of the tab, although "Settings updated." showed | One rule reached the server incomplete, for example after another plugin's script or a security filter changed the form | 2.6.0 |
| Date conditions disappeared after saving, so a time-limited offer never ended | Dates in another format than the editor's, for example from another plugin's date picker | 2.6.0 |
| Plugins page links missing, bundled translations not found | The plugin folder was renamed, for example when a zip was extracted as "pricepep" | 2.6.0 |
| The "Enable auto-updates" link is missing on the Plugins page | No update was waiting | 2.5.2 |
Since 2.6.0, a settings page that can't finish loading names the error that stopped it; see settings page stuck loading. What 2.6.0 does when a rule or a date can't be saved is in my changes aren't saved.
The error is still there after updating
- Check the version that runs. The line under Pricepep on the Plugins page shows it. A copy that came with a theme may be older; see Pricepep came with my theme.
- Look at the path in the message. A path with
wc-dynamic-pricing-and-discounts/includes/classes/comes from an old copy: Pricepep 2.6 has no files in that folder. A path with another plugin's folder comes from that plugin; see plugin conflicts. - Report it. If the message stays on 2.6.0, send a bug report with the full line; see how do I report an error?
Which messages aren't bugs?
| Message | What it means |
|---|---|
| Sorry, coupon "CODE" is not valid when cart item prices are changed (or "when other discounts are applied to the cart") | A coupon setting refused the coupon; see coupon not valid errors |
| This license key or purchase code is not valid, or another license message | See license key not accepted |
| Some rules reached the server incomplete and were not saved as edited | Only the listed rules kept their saved version; see my changes aren't saved |
| Function rp_wcdpd_... can only be called after WordPress init action position 9 (or "after WooCommerce cart is loaded from session") | Custom code calls a Pricepep function too early; a developer should call it later. See the function reference |
Frequently asked questions
The site shows a critical error. How do I update?
Replace the plugin by FTP or SFTP: delete the old wc-dynamic-pricing-and-discounts folder and upload the new one. Your rules and settings stay in the database.
Will updating delete my rules?
No. Rules and settings are stored in the database, and Pricepep upgrades older settings when it loads.
My message isn't in the table. What now?
Update to 2.6.0 first. If the message stays, send a bug report with the full message line, including the file and line number, and WooCommerce's system report.