Changeset 3156507
- Timestamp:
- 09/23/2024 06:59:45 PM (6 months ago)
- 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 3 3 Plugin Name: Easy Duplicate Woo Order 4 4 Description: Adds a custom action to duplicate WooCommerce orders easily. 5 Version: 2.3. 15 Version: 2.3.2 6 6 Plugin URI: https://www.wizbeeit.com/easy-duplicate-woo-order 7 7 Author: wizbee IT … … 16 16 } 17 17 18 19 function wizbee_check_woocommerce_active() { 18 function wb_edwo_check_woocommerce_active() { 20 19 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'); 23 21 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'])) { 27 23 unset($_GET['activate']); 28 24 } 29 25 } 30 26 } 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() { 27 add_action('admin_init', 'wb_edwo_check_woocommerce_active'); 28 function wb_edwo_woocommerce_inactive_notice() { 36 29 ?> 37 30 <div class="notice notice-error is-dismissible"> … … 40 33 <?php 41 34 } 35 function 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 } 42 add_action('deactivated_plugin', 'wb_edwo_woocommerce_plugin_deactivated', 10, 2); 43 42 44 43 45 -
easy-duplicate-woo-order/trunk/readme.txt
r3155984 r3156507 5 5 Tested up to: 6.6 6 6 Requires PHP: 7.2 7 Stable tag: 2.3. 17 Stable tag: 2.3.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 64 64 65 65 == Changelog == 66 67 = 2.3.2 = 68 * Fixed plugin activation and deactivation function 69 66 70 = 2.3.1 = 67 71 * Fixed some minor issues. … … 89 93 == Upgrade Notice == 90 94 91 = 2.3. 0=95 = 2.3.2 = 92 96 Update of Easy Duplicate Woo Order.
Note: See TracChangeset
for help on using the changeset viewer.