Changeset 2671404
- Timestamp:
- 02/02/2022 03:09:09 PM (4 years ago)
- File:
-
- 1 edited
-
socialproofy/trunk/socialproofy.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
socialproofy/trunk/socialproofy.php
r2671381 r2671404 44 44 } 45 45 46 function socialproofy_cron_activation()47 {48 if (!wp_next_scheduled('socialproofy_cronjob')) {49 wp_schedule_event(time(), 'everyminute', 'socialproofy_cronjob');50 }51 }52 53 function socialproofy_cron_deactivate()54 {55 update_option('socialproofy_product_offset', 0);56 $timestamp = wp_next_scheduled('socialproofy_cronjob');57 wp_unschedule_event($timestamp, 'socialproofy_cronjob');58 }59 60 46 function socialproofy_cronjob_init() 61 47 { … … 64 50 socialproofy_send_products(); 65 51 socialproofy_send_latest_orders(); 66 socialproofy_send_customers(); 67 socialproofy_cron_deactivate(); 52 update_option('socialproofy_product_offset', 0); 68 53 } 69 54 } … … 115 100 $args = array( 116 101 'role' => 'customer', 117 'number' => -1,102 'number' => $customer_count, 118 103 'order' => 'ASC', 119 104 'orderby' => 'meta_value', … … 464 449 $permalink = null; 465 450 $image = null; 466 451 467 452 if ($product) { 468 453 $permalink = $product->get_permalink();
Note: See TracChangeset
for help on using the changeset viewer.