WP query doesn’t work as expected with PHP8 when used in AJAX callback
-
Hi,
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…
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘WP query doesn’t work as expected with PHP8 when used in AJAX callback’ is closed to new replies.