WooCommerce Permalinks: Rewrite Rules not generating as expected

39 Views Asked by At

I developed a Wordpress / WooCommerce website on two separate environments. After launching, I encountered inconsistencies between the Live and Development environments which I can not resolve.

In our development environment, I left the WooCommerce "shop page" setting empty as I intended to use a page of our own design for the storefront. This worked fine at the time.

At some point after going live on our web hosts' server, the "Shop page" setting was changed to match the URL of the page we built, and WooCommerce began echoing its default storefront templates at the bottom of the page we built for our store.

I changed the WooCommerce "shop page" back to an empty value but instead of reverting to the previous behaviour and showing my custom shop page, this caused the page I built for our storefront to render empty - just a header and footer without even a 404 message. The slug for the page I built is "/shop".

Changing the slug for the custom storefront page to "/store" allowed it to work properly. However, the client has a strong desire for a URL which reads "/shop".

And yet, when I change the slug for our custom storefront page back to "/shop", WordPress only gives us a header and footer on the front-end without any content in the middle (still no 404 message.)

I've tried creating a "dummy shop page" to satisfy WooCommerce's requirement for a "shop page" in WooCommerce > Settings > Products (with a slug of dummy-shop-page,) but this hasn't improved the situation with the "/shop" page I built for our storefront - the WordPress front-end still only shows that page's content if the slug for that page is "/store", even when "/shop" is not in use by any other pages, or by WooCommerce.

I've tried adding flush_rewrite_rules() to our functions.php and loading it that way a couple of times, but that's the only trick I could find and to no avail.

0

There are 0 best solutions below