Created
December 9, 2015 11:10
-
-
Save jbma/5d7383d164a4898b7e27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function clear_rocket_woocommerce_thankyou( $order_id ) { | |
// code to retrieve the products id from the $order_id | |
// should return an array of ids of the orders names $products_id | |
//empty in this exemple | |
$products_id = array(); | |
// clear Rocket cache for these files | |
foreach ($products_id as $product_id){ | |
rocket_clean_post($product_id); | |
} | |
}; | |
add_action( 'woocommerce_thankyou', 'clear_rocket_woocommerce_thankyou', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment