Balaji - Source Best
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Woocommerce Causes Fatal ErrorHi @charmedchicken,
Both log lines come from the same problem, so you only have one thing to fix.
- The real error:
Call to protected method ... AbstractSchema::get_store_currency_properties() from scope WC_NYP_Store_API. The Name Your Price extension calls a WooCommerce Store API method directly. In your WooCommerce version that method isprotected, so the extension can’t call it from outside the class anymore. - The warning:
Undefined variable $schema in ExtendSchema.php line 273is a side effect of the error above. WooCommerce runs NYP’s schema callback inside a try/catch. When the callback throws,$schemanever gets set, and you get the warning. It isn’t a separate WooCommerce bug.
How to fix it:
- Update Name Your Price to its latest version from your WooCommerce.com account (My Account → Downloads/Subscriptions). Make sure the WooCommerce.com subscription is connected, or the update won’t appear under Plugins. Updating WooCommerce doesn’t update NYP.
- If you’re already on the latest NYP, open a ticket with WooCommerce.com support (link in Adam’s reply). Include your WooCommerce, NYP and PHP versions and this log.
- Short-term workaround if the store is affected right now: on staging first, roll WooCommerce back to the version you had before this update (WP Rollback, or the “Advanced View” on the plugin page), and keep it there until NYP ships a compatible release.
- Please don’t edit
ExtendSchema.phpor make the method public. The next WooCommerce update will overwrite that change.
If NYP is fully up to date and the error still appears with NYP deactivated on staging, please post the new log and we can look further.
Balaji, Source Best Solutions
Forum: Plugins
In reply to: [WooCommerce] Some child pages of Shop are Not FoundThe Shop page slug and the product category base are both
shop, so/shop/child-page/can match either a child page or a product category. When WooCommerce matches it as a category and no category has that slug, you get a 404.WooCommerce works around this in
wc_fix_rewrite_rules(). When your product permalink base starts with the shop page slug, it adds a rewrite rule for each existing child page of Shop. The catch is that WordPress stores rewrite rules and only rebuilds them on a flush. Child pages created after the last flush get no rule, so the category rule catches them and they 404. Pages that existed at the last flush keep working. That matches your symptoms, and it’s why switching themes or turning off plugins changed nothing.Steps to try:
- Flush the rules: go to Settings > Permalinks and click Save Changes without changing anything. The failing child pages should start working. You’ll need to do this again whenever you add a new child page under Shop.
- Check Product permalinks: if it isn’t set to “Shop base” (or a custom base starting with
/shop/), WooCommerce never adds the child-page rules. In that case every child page that doesn’t match a real category will 404. - Permanent fix: change the Product category base to something else, such as
product-categoryorcategory, so it no longer shares a path with your pages. Add 301 redirects from the old/shop/category-name/URLs. Alternatively, keep the category base and move the info pages out from under Shop (e.g./collections/...).
The WPBakery “missing default content area” message is a side effect. The frontend editor loads a 404 template, which has no post content area.
- The real error: