Introduce additional cache purging when creating pages - Consider old pages older than 60 minutes #1311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request:
Closes #1310.
TLDR;
Instead of deleting all pages except for
'faq', 'contact-us', 'blog'
, we now delete only WooCommerce related pages.We're extra careful, and check if the Woo Page we're about to delete is old.
For example, if we have a simple site with a page called
shop
, when an Ecommerce plan is purchased, this page won't be overwritten. but instead we instruct WooCommerce to create a new page"Old" pages, are considered those that are older than 60 minutes.
How to test the changes in this Pull Request:
https://wordpress.com/wp-admin/network/admin.php?page=store-admin&action=blog_id_search&id=https%3A%2F%2FYOURTESTSITE.wordpress.com
Transfers to Atomic dev server pool
and clickAdd dev blog
Settings > Hosting management
and activate SFTP/SSH access (keep the credentials handy for the SSH and SCP commands further down)fix/1310-ensure-pages-are-deleted
scp ./includes/class-wc-calypso-bridge-setup.php [email protected]:/srv/htdocs/wp-content/mu-plugins/wpcomsh/vendor/automattic/wc-calypso-bridge/includes
to your WOA DEV sitetail -f -n1000 /tmp/php-errors
to see the logfile (keep it open)Upgrades
and upgrade to Ecommerce planYou would see something similar to in your terminal - Please copy/paste it in your comments when you wrap up the test.
Other information:
FOR PR REVIEWER ONLY: