wp_set_object_terms – does not work when run by cron
-
wp_set_object_terms – does not work when run by cron
I use cpt onomy in php script to import posts from xml to my blog.
If I run import script in browser, all works fine, but if I run it by cron cpt-taxonomy not assigned to post. It seems like wp_set_object_terms function does not workcron
/usr/local/bin/php /home/user/site.com/public_html/import/test-cpt-onomy.phpFor example simplified version of my script for debugging:
<?php require_once('/home/user/site.com/public_html/wp-load.php'); global $cpt_onomy; $cpt_onomy->wp_set_object_terms(11153, 9737, 'offer', false); echo "done!"; ?>How to fix it?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘wp_set_object_terms – does not work when run by cron’ is closed to new replies.