I wrote a script for myself but I can't execute it. First lines in my code:
$products_IDs = new WP_Query( array(
'post_type' => 'product'
));
and there he says:
PHP Fatal error: Uncaught Error: Class 'WP_Query' not found in
/var/www/vhosts/gmks/httpdocs/cronjob/after_update.php:10
Stack trace:
#0 /var/www/vhosts/gmks/httpdocs/cronjob/after_update.php(7): delold()
#1 {main}
thrown in /var/www/vhosts/gmks/httpdocs/cronjob/after_update.php on line 10
How can I import the WP_Query Class
?
Greetings and Thank You! :)