Changeset 3447104
- Timestamp:
- 01/26/2026 01:10:42 PM (4 weeks ago)
- Location:
- dl-gift-wallet
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.4 (copied) (copied from dl-gift-wallet/trunk)
-
tags/1.0.4/changelog.txt (modified) (1 diff)
-
tags/1.0.4/dl-gift-wallet.php (modified) (7 diffs)
-
tags/1.0.4/readme.txt (modified) (3 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/dl-gift-wallet.php (modified) (7 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dl-gift-wallet/tags/1.0.4/changelog.txt
r3445720 r3447104 1 1 *** DL Gift Wallet *** 2 3 2026-01-26 - version 1.0.4 4 * Fix: Gift Wallet credit is now applied as soon as payment is successful, rather than waiting for the order to be manually completed. 5 * Fix: Prevented gift credit from being applied unless an order has been fully paid. 6 * Improvement: Increased reliability for mixed orders containing both Gift Wallet products and physical items. 2 7 3 8 2026-01-23 - version 1.0.3 -
dl-gift-wallet/tags/1.0.4/dl-gift-wallet.php
r3445720 r3447104 3 3 * Plugin Name: DL Gift Wallet 4 4 * Description: Allow customers to purchase gift credit that is automatically added to a recipient’s store account as balance. 5 * Version: 1.0. 35 * Version: 1.0.4 6 6 * Requires at least: 6.0 7 7 * Requires PHP: 8.3 … … 131 131 const OPTION_KEY = 'dl_gift_wallet_settings_v1'; 132 132 const SETTINGS_TAB_ID = 'dl_gift_wallet'; 133 private $version = '1.0. 3';133 private $version = '1.0.4'; 134 134 135 135 public function __construct() … … 180 180 add_action('woocommerce_checkout_create_order_line_item', [$this, 'copy_meta_to_order_item'], 10, 4); 181 181 182 // Credit recipients + send email 183 add_action('woocommerce_order_status_completed', [$this, 'handle_order_completed'], 10); 182 // Credit recipients + send email (safe for mixed orders). 183 // Trigger on successful payment. 184 add_action('woocommerce_payment_complete', [$this, 'handle_order_paid'], 10); 185 186 // Optional fallback: some gateways set processing without firing payment_complete reliably 187 add_action('woocommerce_order_status_processing', [$this, 'handle_order_paid'], 10); 184 188 185 189 // Wallet use at checkout … … 1168 1172 * --------------------------------------------------------------------- */ 1169 1173 1170 public function handle_order_ completed($order_id)1174 public function handle_order_paid($order_id) 1171 1175 { 1172 1176 $order = wc_get_order($order_id); … … 1175 1179 } 1176 1180 1177 // Prevent double-crediting (e.g. if status changes trigger this again) 1181 // SAFETY: don't process gifts unless the order is actually paid. 1182 if (!$order->is_paid()) { 1183 return; 1184 } 1185 1186 // Prevent double-crediting (gateway callbacks / status changes etc) 1178 1187 if ($order->get_meta('_giftwallet_credited') === 'yes') { 1179 1188 return; … … 1219 1228 } 1220 1229 1221 // Send standard WP account email1222 1230 wp_new_user_notification($user_id, null, 'user'); 1223 1231 } else { … … 1241 1249 } 1242 1250 1243 // Only mark the order as credited if we actually credited something1244 1251 if ($did_credit_any) { 1245 1252 $order->update_meta_data('_giftwallet_credited', 'yes'); -
dl-gift-wallet/tags/1.0.4/readme.txt
r3445720 r3447104 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.3 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 250 250 251 251 == Changelog == 252 253 = 1.0.4 = 254 * Fix: Gift Wallet credit is now applied immediately after successful payment. 255 * Fix: Prevented gift credit from being applied unless an order has been fully paid. 256 * Improvement: Increased reliability for orders containing both Gift Wallet products and physical items. 252 257 253 258 = 1.0.3 = … … 279 284 = Upgrade Notice = 280 285 281 = 1.0. 3=282 Gift Wallet orders are now automatically completed after successful payment, ensuring store credit is applied instantly. This prevents gift credits from being delayed when orders remain in “Processing”.286 = 1.0.4 = 287 Improves reliability of gift deliverability. -
dl-gift-wallet/trunk/changelog.txt
r3445720 r3447104 1 1 *** DL Gift Wallet *** 2 3 2026-01-26 - version 1.0.4 4 * Fix: Gift Wallet credit is now applied as soon as payment is successful, rather than waiting for the order to be manually completed. 5 * Fix: Prevented gift credit from being applied unless an order has been fully paid. 6 * Improvement: Increased reliability for mixed orders containing both Gift Wallet products and physical items. 2 7 3 8 2026-01-23 - version 1.0.3 -
dl-gift-wallet/trunk/dl-gift-wallet.php
r3445720 r3447104 3 3 * Plugin Name: DL Gift Wallet 4 4 * Description: Allow customers to purchase gift credit that is automatically added to a recipient’s store account as balance. 5 * Version: 1.0. 35 * Version: 1.0.4 6 6 * Requires at least: 6.0 7 7 * Requires PHP: 8.3 … … 131 131 const OPTION_KEY = 'dl_gift_wallet_settings_v1'; 132 132 const SETTINGS_TAB_ID = 'dl_gift_wallet'; 133 private $version = '1.0. 3';133 private $version = '1.0.4'; 134 134 135 135 public function __construct() … … 180 180 add_action('woocommerce_checkout_create_order_line_item', [$this, 'copy_meta_to_order_item'], 10, 4); 181 181 182 // Credit recipients + send email 183 add_action('woocommerce_order_status_completed', [$this, 'handle_order_completed'], 10); 182 // Credit recipients + send email (safe for mixed orders). 183 // Trigger on successful payment. 184 add_action('woocommerce_payment_complete', [$this, 'handle_order_paid'], 10); 185 186 // Optional fallback: some gateways set processing without firing payment_complete reliably 187 add_action('woocommerce_order_status_processing', [$this, 'handle_order_paid'], 10); 184 188 185 189 // Wallet use at checkout … … 1168 1172 * --------------------------------------------------------------------- */ 1169 1173 1170 public function handle_order_ completed($order_id)1174 public function handle_order_paid($order_id) 1171 1175 { 1172 1176 $order = wc_get_order($order_id); … … 1175 1179 } 1176 1180 1177 // Prevent double-crediting (e.g. if status changes trigger this again) 1181 // SAFETY: don't process gifts unless the order is actually paid. 1182 if (!$order->is_paid()) { 1183 return; 1184 } 1185 1186 // Prevent double-crediting (gateway callbacks / status changes etc) 1178 1187 if ($order->get_meta('_giftwallet_credited') === 'yes') { 1179 1188 return; … … 1219 1228 } 1220 1229 1221 // Send standard WP account email1222 1230 wp_new_user_notification($user_id, null, 'user'); 1223 1231 } else { … … 1241 1249 } 1242 1250 1243 // Only mark the order as credited if we actually credited something1244 1251 if ($did_credit_any) { 1245 1252 $order->update_meta_data('_giftwallet_credited', 'yes'); -
dl-gift-wallet/trunk/readme.txt
r3445720 r3447104 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.3 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 250 250 251 251 == Changelog == 252 253 = 1.0.4 = 254 * Fix: Gift Wallet credit is now applied immediately after successful payment. 255 * Fix: Prevented gift credit from being applied unless an order has been fully paid. 256 * Improvement: Increased reliability for orders containing both Gift Wallet products and physical items. 252 257 253 258 = 1.0.3 = … … 279 284 = Upgrade Notice = 280 285 281 = 1.0. 3=282 Gift Wallet orders are now automatically completed after successful payment, ensuring store credit is applied instantly. This prevents gift credits from being delayed when orders remain in “Processing”.286 = 1.0.4 = 287 Improves reliability of gift deliverability.
Note: See TracChangeset
for help on using the changeset viewer.