Changeset 3670506
- Timestamp:
- 08/28/2026 02:23:45 PM (2 months ago)
- Location:
- anise-simple-discounts/trunk
- Files:
-
- 4 added
- 4 edited
-
anise-simple-discounts.php (modified) (2 diffs)
-
assets (added)
-
assets/popup.js (added)
-
assets/popupstyle.css (added)
-
include/discounts.php (modified) (1 diff)
-
include/popupsource.php (added)
-
readme.txt (modified) (3 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
anise-simple-discounts/trunk/anise-simple-discounts.php
r3642344 r3670506 5 5 * Author: Michał Adamek 6 6 * Author URI: https://github.com/NightVanHelsing 7 * Version: 1. 0.07 * Version: 1.1.0 8 8 * License: GPL v2 or later 9 9 * License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 15 15 exit; 16 16 } 17 define('ASD_PLUGIN_URL',plugin_dir_url(__FILE__)); 17 18 require_once __DIR__.'/include/discounts.php'; 18 19 require_once __DIR__.'/include/user-panel.php'; 20 require_once __DIR__.'/include/popupsource.php'; 21 -
anise-simple-discounts/trunk/include/discounts.php
r3642344 r3670506 12 12 $asd_percentage = (int) get_user_meta($asd_client_id, 'asd_discount_percentage', true); 13 13 if ($asd_percentage > 0 && $asd_percentage < 100) { 14 $discount = (WC()->cart-> cart_contents_total) * ($asd_percentage/100);14 $discount = (WC()->cart->get_cart_contents_total()) * ($asd_percentage/100); 15 15 WC()->cart->add_fee(__('Permament discount','anise-simple-discounts'), -$discount); 16 } 16 } 17 17 } 18 18 } 19 20 -
anise-simple-discounts/trunk/readme.txt
r3642344 r3670506 3 3 Tags: discounts, woocommerce, customer 4 4 Requires at least: 7.0 5 Tested up to: 7. 05 Tested up to: 7.1 6 6 Requires PHP: 8.2 7 Stable tag: 1. 0.07 Stable tag: 1.1.0 8 8 License: GPL v2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 31 31 Edit a user's profile and enter a value between 1 and 99. 32 32 33 = How do I delete assigned discounts? = 34 35 When disabling the plugin, you will have the option to delete all assigned discounts. 36 33 37 == Upgrade Notice == 38 39 = 1.1.0 = 40 Added a prompt asking whether to delete discount data when disabling the plugin. 34 41 35 42 = 1.0.0 = … … 38 45 == Changelog == 39 46 47 = 1.1.0 = 48 - Added a prompt asking whether to delete discount data when disabling the plugin. 49 40 50 = 1.0.0 = 41 Initial release.51 - Initial release. -
anise-simple-discounts/trunk/uninstall.php
r3642344 r3670506 3 3 die; 4 4 } 5 5 6 delete_metadata('user',0,'asd_discount_percentage','',true);
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)