WP_Query not working in plugin
-
I made a plugin that schedules a php file to run and update certain posts meta once a day.
The problem is in the php file that runs once a day, when I load it into my browser gives me this error
Fatal error: Class ‘WP_Query’ not found in /nfs/c09/h04/mnt/140191/domains/dev.videogamecoupons.com/html/wp-content/plugins/Amazon-price-checker/Example.php on line 6
$query = new WP_Query( array( ‘cat’ => $pricecat, ‘meta_key’ => ‘ASIN’, ));
Is the line it is referring to. Do I need to include wordpress functions somehow to make WP_query work in a plugin?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘WP_Query not working in plugin’ is closed to new replies.