WP query doesn’t seem working as expected with PHP8 when it’s used in an AJAX callback function.
Both with WP_Query and get_posts, using $post->ID or get_the_ID() within the foreach following the query returns NULL.
I tested multiple scenarios, w/wo wp_setup_postdata, $wpdb->get_posts, etc., and the result was always the same.
Thanks for investigating this further…
- You must be logged in to reply to this topic.