skip to Main Content

Run query inside WP hook? – WordPress

I want to use the hook from below. The hook will run when a draft is published function mepr_clear_cached_ids($post) { $post_type = get_post_type($post); if($post_type && $post_type == 'memberpressproduct') { // Run query here. } } add_action('draft_to_publish', 'mepr_clear_cached_ids'); inside the hook…

VIEW QUESTION
Back To Top
Search