Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › WooCommerce Product Scheduler integration – 2
- This topic has 8 replies, 4 voices, and was last updated 7 years, 1 month ago by WCFM Forum.
- AuthorPosts
- October 18, 2017 at 8:03 pm #14540Lourenco.cfParticipant
Original thread – http://wclovers.com/forums/topic/woocommerce-product-scheduler-integration/
I resolved to open the topic with the same subject, to divulge to everyone how easily I resolved.
Add one ACF data picker field, for end date.
Next add to the fuctions.php a cron scheduler, some like these..
When read the date from the custom acf field, put the product in draft.. our can delete… our something.
Easy.// expire products on date field. if (!wp_next_scheduled('expire_posts')){ wp_schedule_event(time(), 'daily', 'expire_posts'); // this can be hourly, twicedaily, or daily } add_action('expire_posts', 'expire_posts_function'); function expire_posts_function() { $today = date('Ymd'); $args = array( 'post_type' => array('product'), // post types you want to check 'posts_per_page' => -1 ); $posts = get_posts($args); foreach($posts as $p){ $expiredate = get_field('end_date', $p->ID, false, false); // get the raw date from the db if ($expiredate) { if($expiredate < $today){ $postdata = array( 'ID' => $p->ID, 'post_status' => 'draft' ); wp_update_post($postdata); } } } }
You can tweak the code to publish the product to…
Only add another field “start date”.Thank you
- October 18, 2017 at 8:15 pm #14544WCfM ForumGuest
Hi,
Again I don’t know how to say you thanks for this!!
I am sorry because old post automatically closed after certain time.
It’s pleasure for me to have a user like you.
Thank you very much mate !!
Shhiv
- October 19, 2017 at 2:10 am #14551memtimintursunParticipant
This is reply for the closed topic; http://wclovers.com/forums/topic/questions-before-but-this/
Whatever I do, it doesn’t work. I did many times what you said.
I am almost giving up this if this doesn’t work for me.
- October 19, 2017 at 5:27 am #14560WCfM ForumGuest
Hi,
I am sorry as topics are automatically closed for a certain period inactivity!!
Please tell me what kind of issues you are now facing?
What can I do for you ?
Thank You
- October 19, 2017 at 8:23 pm #14567memtimintursunParticipant
EbayImport shows on menu, when you click it, not found page. but it was working on 3.17 version, after you updated to 3.20 version, it’s gone, no more working. when I am asking, you saying same things, it should work, do this, that. but with out you saying it, I did already tried those steps. but it’s not working.
shortly, is there possible to include custom menu and for that menu addon from woocommerce?
I want to give this possibilities only for paid memebers. however, even I can’t integrate it in the free version, what is point to buy ultimate version, if it doesn’t work?
for that reason, I am almost giving up.
- October 20, 2017 at 4:00 am #14576WCfM ForumGuest
Hi,
I am not sure why it’s not working for you!!
But if such things not working for WCFM then it’s all add-ons are going to be useless.
WCFM only offers five main menus – Product, Order, Coupon and Settings
But all other menu items are added externally using add-ons, you can check any of our demos.
I want to resolve this for you, if you can share a demo access with me then I will take a look in depth of this.
Thank You
- October 20, 2017 at 8:36 am #14584memtimintursunParticipant
Did you mean “demo admin” or “demo vendor”?
- October 20, 2017 at 1:23 pm #14586WCfM ForumGuest
Demo admin prferred!!
Thanks for your cooperation ..
- October 20, 2017 at 8:42 pm #14629WCFM ForumMember
Hi @memtimintursun,
I am closing this thread as it’s context something else.
Please share your site access not here, at mail – wclovers.contact@gmail.com
Looking forward to hear from you soon.
Thank You
- AuthorPosts
- The topic ‘WooCommerce Product Scheduler integration – 2’ is closed to new replies.