Redirection from a specific page for users logged in but not with membership

Your code is fine to me, except you made a mistake here: template_redirect(‘/product/channel-mcgilchrist’); WordPress does not have a function named template_redirect, only a hook with that name. So you should have used either wp_redirect() or wp_safe_redirect() which are valid functions to perform URL/page redirections in WordPress. wp_safe_redirect( ‘/product/channel-mcgilchrist’ );

How to move a post from one category to another

add_action(‘wpcf7_mail_sent’, function ($cf7) { $submission = WPCF7_Submission::get_instance(); $data = $submission->get_posted_data(); if( empty($data[‘_wpcf7_container_post’]) ) return; $post_id = (int) $data[‘_wpcf7_container_post’]; wp_remove_object_terms( $post_id, ‘available’, ‘category’); wp_set_object_terms( $post_id, ‘booked’, ‘category’); });