new WP_Query(), have_posts() return false in user_register hook

I resolved this by adding ‘post_status’ => ‘draft’ to the $args array, as below $args = array( ‘meta_query’ => array( array( ‘key’ => ‘sending_time’, ‘value’ => ‘on_registration’, ‘compare’ => ‘=’, ) ), ‘post_type’ => ‘_jq_notifications’, ‘posts_per_page’ => -1, ‘post_status’ => ‘draft’ ); The custom post type “_jq_notifications” default status was draft. The documentation here says … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)