Plugin Directory

Changeset 3462715


Ignore:
Timestamp:
02/16/2026 04:46:15 PM (4 days ago)
Author:
jneshipping
Message:

Update to 1.8.0

Location:
jne-shipping-official
Files:
1 edited
40 copied

Legend:

Unmodified
Added
Removed
  • jne-shipping-official/tags/1.8.0/trunk/includes/class-jne-woocommerce.php

    r3462630 r3462715  
    169169        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_awb_assets' );
    170170
     171        // Ensure cron job is scheduled (for plugin updates)
     172        $this->loader->add_action( 'admin_init', $this, 'ensure_webhook_log_cleanup_cron' );
     173
    171174    }
    172175
     
    235238    }
    236239
     240    /**
     241     * Ensure webhook log cleanup cron job is scheduled
     242     * This ensures cron is registered even when plugin is updated (not just activated)
     243     *
     244     * @since     1.8.0
     245     * @return    void
     246     */
     247    public function ensure_webhook_log_cleanup_cron() {
     248        if (!wp_next_scheduled('jneshof_clear_old_webhook_logs')) {
     249            wp_schedule_event(time(), 'daily', 'jneshof_clear_old_webhook_logs');
     250        }
     251    }
     252
    237253}
  • jne-shipping-official/trunk/includes/class-jne-woocommerce.php

    r3462630 r3462715  
    169169        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_awb_assets' );
    170170
     171        // Ensure cron job is scheduled (for plugin updates)
     172        $this->loader->add_action( 'admin_init', $this, 'ensure_webhook_log_cleanup_cron' );
     173
    171174    }
    172175
     
    235238    }
    236239
     240    /**
     241     * Ensure webhook log cleanup cron job is scheduled
     242     * This ensures cron is registered even when plugin is updated (not just activated)
     243     *
     244     * @since     1.8.0
     245     * @return    void
     246     */
     247    public function ensure_webhook_log_cleanup_cron() {
     248        if (!wp_next_scheduled('jneshof_clear_old_webhook_logs')) {
     249            wp_schedule_event(time(), 'daily', 'jneshof_clear_old_webhook_logs');
     250        }
     251    }
     252
    237253}
Note: See TracChangeset for help on using the changeset viewer.