Auto Regenerate
-
Hi, is there any to auto-generate for any ‘product’ (Woocommerce) that has been submitted from WP User Frontend?
function wpdoc_flush_rules_on_save_posts( $post_id ) { // Check the correct post type. // Example to check, if the post type isn't 'post' then don't flush, just return. if ( ! empty( $_POST['post_type'] && $_POST['post_type'] != 'product' )) { return; } flush_rewrite_rules(); } add_action( 'save_post', 'wpdoc_flush_rules_on_save_posts', 20, 2);I have this function but it doesn’t work.
https://prnt.sc/ts3de1
If I click update or change the status of the post then the URL goes https://prnt.sc/ts3dkuCould you please help me?
Thank you 🙂
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Auto Regenerate’ is closed to new replies.