Skip to content

add clear template cache tool #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 15, 2020
Merged

Conversation

rrennick
Copy link
Contributor

@rrennick rrennick commented Jun 12, 2020

Note this needs woocommerce/woocommerce#26752 merged to work.

Use testing instructions from woocommerce/woocommerce#26752.

Test failures are not related to this PR.

@rrennick rrennick added status: needs review PR that needs review. [auto] templating Issue related to WooCommerce templates. labels Jun 12, 2020
@@ -538,6 +551,11 @@ public function execute_tool( $tool ) {
$message = __( 'Database upgrade routine has been scheduled to run in the background.', 'woocommerce-rest-api' );
break;

case 'clear_template_cache':
wc_clear_template_cache();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add a function check for wc_clear_template_cache here and return an error if it does not exists.

Copy link
Contributor

@vedanshujain vedanshujain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a minor comment which should be addresssed, other than that looks good. Also would need to fix conflicts before merge.

@rrennick
Copy link
Contributor Author

@vedanshujain This is ready for another review.

Copy link
Contributor

@vedanshujain vedanshujain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!! 🙌

@vedanshujain vedanshujain merged commit 686c787 into master Jun 15, 2020
@vedanshujain vedanshujain deleted the add/clear-template-cache branch June 15, 2020 18:21
@vedanshujain vedanshujain added status: approved PRs that have been approved and ready to be merged. and removed status: needs review PR that needs review. [auto] labels Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: approved PRs that have been approved and ready to be merged. templating Issue related to WooCommerce templates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants