Plugin Directory

Changeset 3156507


Ignore:
Timestamp:
09/23/2024 06:59:45 PM (6 months ago)
Author:
wizbee
Message:

2.3.2

Location:
easy-duplicate-woo-order
Files:
10 added
2 edited

Legend:

Unmodified
Added
Removed
  • easy-duplicate-woo-order/trunk/easy-duplicate-woo-order.php

    r3155984 r3156507  
    33Plugin Name: Easy Duplicate Woo Order
    44Description: Adds a custom action to duplicate WooCommerce orders easily.
    5 Version: 2.3.1
     5Version: 2.3.2
    66Plugin URI: https://www.wizbeeit.com/easy-duplicate-woo-order
    77Author: wizbee IT
     
    1616}
    1717
    18 
    19 function wizbee_check_woocommerce_active() {
     18function wb_edwo_check_woocommerce_active() {
    2019    if (!class_exists('WooCommerce')) {
    21         // Display admin notice
    22         add_action('admin_notices', 'wizbee_woocommerce_inactive_notice');
     20        add_action('admin_notices', 'wb_edwo_woocommerce_inactive_notice');
    2321        deactivate_plugins(plugin_basename(__FILE__));
    24        
    25         // Check if 'activate' is set and verify nonce before unsetting
    26         if (isset($_GET['activate']) && check_admin_referer('activate-plugin_' . plugin_basename(__FILE__))) {
     22        if (isset($_GET['activate'])) {
    2723            unset($_GET['activate']);
    2824        }
    2925    }
    3026}
    31 
    32 add_action('admin_init', 'wizbee_check_woocommerce_active');
    33 
    34 // Display notice if WooCommerce is not active
    35 function wizbee_woocommerce_inactive_notice() {
     27add_action('admin_init', 'wb_edwo_check_woocommerce_active');
     28function wb_edwo_woocommerce_inactive_notice() {
    3629    ?>
    3730    <div class="notice notice-error is-dismissible">
     
    4033    <?php
    4134}
     35function wb_edwo_woocommerce_plugin_deactivated($plugin, $network_deactivating) {
     36    if ($plugin === 'woocommerce/woocommerce.php') {
     37        // Deactivate this plugin
     38        deactivate_plugins(plugin_basename(__FILE__));
     39        add_action('admin_notices', 'wb_edwo_woocommerce_inactive_notice');
     40    }
     41}
     42add_action('deactivated_plugin', 'wb_edwo_woocommerce_plugin_deactivated', 10, 2);
     43
    4244
    4345
  • easy-duplicate-woo-order/trunk/readme.txt

    r3155984 r3156507  
    55Tested up to: 6.6
    66Requires PHP: 7.2
    7 Stable tag: 2.3.1
     7Stable tag: 2.3.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6464
    6565== Changelog ==
     66
     67= 2.3.2 =
     68* Fixed plugin activation and deactivation function
     69
    6670= 2.3.1 =
    6771* Fixed some minor issues.
     
    8993== Upgrade Notice ==
    9094
    91 = 2.3.0 =
     95= 2.3.2 =
    9296Update of Easy Duplicate Woo Order.
Note: See TracChangeset for help on using the changeset viewer.