Plugin Directory

Changeset 2671404


Ignore:
Timestamp:
02/02/2022 03:09:09 PM (4 years ago)
Author:
socialproofy
Message:

some bug fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • socialproofy/trunk/socialproofy.php

    r2671381 r2671404  
    4444}
    4545
    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 
    6046function socialproofy_cronjob_init()
    6147{
     
    6450        socialproofy_send_products();
    6551        socialproofy_send_latest_orders();
    66         socialproofy_send_customers();
    67         socialproofy_cron_deactivate();
     52        update_option('socialproofy_product_offset', 0);
    6853    }
    6954}
     
    115100    $args = array(
    116101        'role' => 'customer',
    117         'number' => -1,
     102        'number' => $customer_count,
    118103        'order' => 'ASC',
    119104        'orderby' => 'meta_value',
     
    464449        $permalink = null;
    465450        $image = null;
    466        
     451
    467452        if ($product) {
    468453            $permalink = $product->get_permalink();
Note: See TracChangeset for help on using the changeset viewer.