I have a SQL query which does exactly what I want if I run it directly in the database:
And have added this code to my functions.php file in my child theme:
But I’m trying to get it to run using a plugin called ‘WP Crontrol’.
It has an option for adding a new Cron Event and so I’m using the hook cron_expire_nonactive_memberships
and have been running it manually but nothing happens.
I’m running as a localhost if that makes any difference.
I’m not sure if I have a problem with my php code that’s attempting to run my SQL – how can I debug what’s going on?
Edit:
Hmm, I can see a lot of the following in the error logs but I’m unsure how to resolve:
PHP Notice: Undefined property: wpdb::$wp_users in C:xampphtdocsmyprojectwp-includeswp-db.php on line 648
- Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
- Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
- Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.
Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com