Changeset 3450272
- Timestamp:
- 01/30/2026 09:27:27 AM (6 weeks ago)
- Location:
- wallets/trunk
- Files:
-
- 20 added
- 20 deleted
- 10 edited
-
adapters/class-bank-fiat-adapter.php (modified) (2 diffs)
-
adapters/class-bitcoin-core-like-wallet-adapter.php (modified) (1 diff)
-
admin/assets.php (modified) (7 diffs)
-
admin/dashboard.php (modified) (1 diff)
-
admin/settings.php (modified) (2 diffs)
-
assets/scripts/bs58check-6.4.0.min.js (deleted)
-
assets/scripts/bs58check-6.4.0.min.js.map (deleted)
-
assets/scripts/bs58check-6.4.1.min.js (added)
-
assets/scripts/bs58check-6.4.1.min.js.map (added)
-
assets/scripts/wallets-admin-capabilities-6.4.0.min.js (deleted)
-
assets/scripts/wallets-admin-capabilities-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-admin-capabilities-6.4.1.min.js (added)
-
assets/scripts/wallets-admin-capabilities-6.4.1.min.js.map (added)
-
assets/scripts/wallets-admin-cs-tool-6.4.0.min.js (deleted)
-
assets/scripts/wallets-admin-cs-tool-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-admin-cs-tool-6.4.1.min.js (added)
-
assets/scripts/wallets-admin-cs-tool-6.4.1.min.js.map (added)
-
assets/scripts/wallets-admin-dashboard-6.4.0.min.js (deleted)
-
assets/scripts/wallets-admin-dashboard-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-admin-dashboard-6.4.1.min.js (added)
-
assets/scripts/wallets-admin-dashboard-6.4.1.min.js.map (added)
-
assets/scripts/wallets-admin-deposit-tool-6.4.0.min.js (deleted)
-
assets/scripts/wallets-admin-deposit-tool-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-admin-deposit-tool-6.4.1.min.js (added)
-
assets/scripts/wallets-admin-deposit-tool-6.4.1.min.js.map (added)
-
assets/scripts/wallets-admin-docs-6.4.0.min.js (deleted)
-
assets/scripts/wallets-admin-docs-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-admin-docs-6.4.1.min.js (added)
-
assets/scripts/wallets-admin-docs-6.4.1.min.js.map (added)
-
assets/scripts/wallets-admin-editor-6.4.0.min.js (deleted)
-
assets/scripts/wallets-admin-editor-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-admin-editor-6.4.1.min.js (added)
-
assets/scripts/wallets-admin-editor-6.4.1.min.js.map (added)
-
assets/scripts/wallets-admin-menu-item-6.4.0.min.js (deleted)
-
assets/scripts/wallets-admin-menu-item-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-admin-menu-item-6.4.1.min.js (added)
-
assets/scripts/wallets-admin-menu-item-6.4.1.min.js.map (added)
-
assets/scripts/wallets-front-6.4.0.min.js (deleted)
-
assets/scripts/wallets-front-6.4.0.min.js.map (deleted)
-
assets/scripts/wallets-front-6.4.1.min.js (added)
-
assets/scripts/wallets-front-6.4.1.min.js.map (added)
-
assets/styles/wallets-6.4.0.min.css (deleted)
-
assets/styles/wallets-6.4.1.min.css (added)
-
assets/styles/wallets-admin-6.4.0.min.css (deleted)
-
assets/styles/wallets-admin-6.4.1.min.css (added)
-
cron/class-email-queue-task.php (modified) (2 diffs)
-
docs/settings.md (modified) (1 diff)
-
frontend/assets.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
wallets.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wallets/trunk/adapters/class-bank-fiat-adapter.php
r3183058 r3450272 159 159 160 160 public function get_wallet_version(): string { 161 return '6.4. 0';161 return '6.4.1'; 162 162 } 163 163 … … 690 690 get_asset_path( 'wallets-admin-deposit-tool' ), 691 691 [ 'jquery' ], 692 '6.4. 0',692 '6.4.1', 693 693 true 694 694 ); -
wallets/trunk/adapters/class-bitcoin-core-like-wallet-adapter.php
r3183058 r3450272 738 738 [ 739 739 'timeout' => absint( get_ds_option( 'wallets_http_timeout', 5 ) ), 740 'user-agent' => 'Bitcoin and Altcoin Wallets version 6.4. 0',740 'user-agent' => 'Bitcoin and Altcoin Wallets version 6.4.1', 741 741 'headers' => [ 742 742 'Accept-Encoding: gzip', -
wallets/trunk/admin/assets.php
r3183058 r3450272 22 22 get_asset_path( 'wallets-admin', 'style' ), 23 23 [], 24 '6.4. 0'24 '6.4.1' 25 25 ); 26 26 … … 52 52 get_asset_path( 'wallets-admin-menu-item' ), 53 53 [ 'jquery' ], 54 '6.4. 0',54 '6.4.1', 55 55 true 56 56 ); … … 60 60 get_asset_path( 'wallets-admin-cs-tool' ), 61 61 [ 'jquery-qrcode' ], 62 '6.4. 0',62 '6.4.1', 63 63 true 64 64 ); … … 75 75 get_asset_path( 'wallets-admin-capabilities' ), 76 76 [ 'jquery-ui-tabs' ], 77 '6.4. 0',77 '6.4.1', 78 78 true 79 79 ); … … 83 83 get_asset_path( 'wallets-admin-dashboard' ), 84 84 [ 'jquery-ui-tabs', 'jqcloud' ], 85 '6.4. 0',85 '6.4.1', 86 86 true 87 87 ); … … 91 91 get_asset_path( 'wallets-admin-docs' ), 92 92 [ 'jquery' ], 93 '6.4. 0',93 '6.4.1', 94 94 true 95 95 ); … … 99 99 get_asset_path( 'wallets-admin-editor' ), 100 100 [ 'suggest' ], 101 '6.4. 0',101 '6.4.1', 102 102 true 103 103 ); -
wallets/trunk/admin/dashboard.php
r3183058 r3450272 349 349 global $wpdb; 350 350 351 $debug_data[ (string) __( 'Plugin version', 'wallets' ) ] = '6.4. 0';352 $debug_data[ (string) __( 'Git SHA', 'wallets' ) ] = ' 39054362';351 $debug_data[ (string) __( 'Plugin version', 'wallets' ) ] = '6.4.1'; 352 $debug_data[ (string) __( 'Git SHA', 'wallets' ) ] = '4f0cdbf8'; 353 353 $debug_data[ (string) __( 'Web Server', 'wallets' ) ] = $_SERVER['SERVER_SOFTWARE']; 354 354 $debug_data[ (string) __( 'PHP version', 'wallets' ) ] = PHP_VERSION; -
wallets/trunk/admin/settings.php
r3183058 r3450272 31 31 const DEFAULT_RATES_VS = [ 'btc', 'usd' ]; 32 32 const DEFAULT_CRON_EMAILS_MAX_BATCH_SIZE = 8; 33 const DEFAULT_CRON_EMAILS_MAX_RECIPIENTS_BATCH_SIZE = 20; 33 34 const DEFAULT_DISABLE_CACHE = false; 34 35 const DEFAULT_TRANSIENTS_BROKEN = false; … … 471 472 472 473 add_settings_field( 474 'wallets_emails_max_recipients_batch_size', 475 sprintf( (string) __( '%s Outgoing e-mails recipient batch size', 'wallets' ), '📧' ), 476 __NAMESPACE__ . '\numeric_cb', 477 "wallets_settings_{$tab}_page", 478 "wallets_{$tab}_section", 479 [ 480 'label_for' => 'wallets_emails_max_recipients_batch_size', 481 'description' => __( 'How many recipients are allowed per email, when emails are send from the email queue on each cron run. If the recipients are too many, then the email is sent multiple times, once for each recipient batch.', 'wallets' ), 482 'min' => 1, 483 'max' => 100, 484 'step' => 1, 485 'default' => DEFAULT_CRON_EMAILS_MAX_RECIPIENTS_BATCH_SIZE, 486 ] 487 ); 488 489 register_setting( 490 "wallets_{$tab}_section", 491 'wallets_emails_max_recipients_batch_size' 492 ); 493 494 add_settings_field( 473 495 'wallets_confirm_move_user_enabled', 474 496 sprintf( (string) __( '%s Move confirm links', 'wallets' ), '🔗' ), -
wallets/trunk/cron/class-email-queue-task.php
r2887566 r3450272 24 24 $this->task_start_time = time(); 25 25 26 $email_queue = json_decode( get_ds_option( 'wallets_email_queue', '[]' ) );26 $email_queue = json_decode( get_ds_option( 'wallets_email_queue', '[]' ), true ); 27 27 28 28 $max_batch_size = absint( … … 33 33 ); 34 34 35 // Maximum recipients allowed in a single SMTP DATA command 36 $max_recipients_per_email = absint( 37 get_ds_option( 38 'wallets_emails_max_recipients_batch_size', 39 DEFAULT_CRON_EMAILS_MAX_RECIPIENTS_BATCH_SIZE 40 ) 41 ); 42 35 43 $i = 0; 36 while ( $i++ < $max_batch_size && $email_queue && time() < $this->task_start_time + $this->timeout ) { 44 while ( $i++ < $max_batch_size && ! empty( $email_queue ) && time() < $this->task_start_time + $this->timeout ) { 45 46 // Peek at the first item in the queue 37 47 $email_args = array_shift( $email_queue ); 48 $recipients = $email_args[0] ?? ''; 38 49 39 $sending_to = null; 50 // Standardize recipients to an array 51 $recipients_array = is_array( $recipients ) ? $recipients : explode( ',', $recipients ); 52 $recipients_array = array_filter( array_map( 'trim', $recipients_array ) ); 40 53 41 if ( isset( $email_args[ 0 ] ) ) { 42 if ( is_array( $email_args[ 0 ] ) ) { 43 $sending_to = implode( ',', $email_args[ 0 ] ); 44 } elseif ( is_string( $email_args[ 0 ] ) ) { 45 $sending_to = $email_args[ 0 ]; 54 if ( count( $recipients_array ) > $max_recipients_per_email ) { 55 // Slice the first chunk to send now 56 $current_batch = array_slice( $recipients_array, 0, $max_recipients_per_email ); 57 58 // Slice the remaining to put back in the queue 59 $remaining_recipients = array_slice( $recipients_array, $max_recipients_per_email ); 60 61 // Prepare the "remaining" item and push it back to the START of the queue 62 $remaining_args = $email_args; 63 $remaining_args[0] = $remaining_recipients; 64 array_unshift( $email_queue, $remaining_args ); 65 66 // Update local args for the current send 67 $email_args[0] = $current_batch; 68 } 69 70 // Proceed with sending the current batch 71 $sending_to = is_array( $email_args[0] ) ? implode( ',', $email_args[0] ) : $email_args[0]; 72 73 if ( $sending_to ) { 74 $this->log( 'Sending email batch to: ' . $sending_to ); 75 $result = call_user_func_array( 'wp_mail', $email_args ); 76 77 if ( ! $result ) { 78 $this->log( 'Could not send email to: ' . $sending_to ); 46 79 } 47 80 } 48 81 49 if ( $sending_to ) { 50 $this->log( 'Sending email to: ' . $sending_to ); 51 52 $result = call_user_func_array( 'wp_mail', $email_args ); 53 if ( ! $result ) { 54 $this->log( 'Could not send email to: ' . ( is_array( $email_args[ 0 ] ) ? implode( ',', $email_args[ 0 ] ) : $email_args[ 0 ] ) ); 55 } 56 } 57 58 // Here we save the queue after every send. This way, we don't lose state if the process dies. 59 update_ds_option( 'wallets_email_queue', json_encode( $email_queue ) ); 82 // Save state after every iteration 83 update_ds_option( 'wallets_email_queue', json_encode( array_values( $email_queue ) ) ); 60 84 } 61 85 } -
wallets/trunk/docs/settings.md
r3183058 r3450272 174 174 175 175 Sending emails normally requires a functioning PHP `mail()` on the server. However, you can setup WordPress to use an external SMTP server, such as that of Gmail. To do this, you can use the [WP Mail SMTP][wp-mail-smtp] plugin. 176 177 178 ### Outgoing e-mails recipient batch size 179 180 | | | 181 | --- | --- | 182 | *Option* | `wallets_emails_max_recipients_batch_size` | 183 | *Default* | `20` | 184 | *Description* | *How many emails to send from the email queue on each cron run.* | 185 186 How many recipients are allowed per email, when emails are send from the email queue on each cron run. If the recipients are too many, then the email is sent multiple times, once for each recipient batch. 176 187 177 188 -
wallets/trunk/frontend/assets.php
r3183058 r3450272 23 23 get_asset_path( 'wallets', 'style' ), 24 24 [], 25 '6.4. 0'25 '6.4.1' 26 26 ); 27 27 … … 86 86 get_asset_path( 'jsqrcode' ), 87 87 [ 'jquery' ], 88 '6.4. 0',88 '6.4.1', 89 89 true 90 90 ); … … 128 128 get_asset_path( 'wallets-front' ), 129 129 [ 'knockout', 'jquery', 'style-scoped', 'sprintf.js' ], 130 '6.4. 0',130 '6.4.1', 131 131 true 132 132 ); -
wallets/trunk/readme.txt
r3183058 r3450272 4 4 Tags: wallet, bitcoin, cryptocurrency, altcoin, custodial 5 5 Requires at least: 6.0 6 Tested up to: 6. 6.26 Tested up to: 6.9 7 7 Requires PHP: 7.0 8 Stable tag: 6.4. 08 Stable tag: 6.4.1 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 337 337 338 338 == Changelog == 339 340 = 6.4.1 = 341 - Add: New filterable setting "Outgoing e-mails recipient batch size". For emails with multiple recipients, the recipients are batched and the email is sent multiple times to work around the max recipient limitats of SMTP servers. 339 342 340 343 = 6.4.0 = … … 516 519 == Upgrade Notice == 517 520 518 Version `6.4. 0` improves performance of the plugin.521 Version `6.4.1` adresses an issue where emails with too many recipients would be rejected by SMTP servers. 519 522 520 523 == Donating == -
wallets/trunk/wallets.php
r3183058 r3450272 3 3 * Plugin Name: Bitcoin and Altcoin Wallets 4 4 * Description: Custodial cryptocurrency wallets. 5 * Version: 6.4. 05 * Version: 6.4.1 6 6 * Plugin URI: https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin 7 7 * Requires at least: 6.0 … … 15 15 * 16 16 * @author Alexandros Georgiou <info@dashed-slug.net> 17 * @copyright 202 4Alexandros Georgiou17 * @copyright 2026 Alexandros Georgiou 18 18 * @license GPL-2.0-or-later 19 19 * @since 1.0.0 … … 35 35 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 36 36 37 Copyright 202 4Alexandros Georgiou37 Copyright 2026 Alexandros Georgiou 38 38 */ 39 39
Note: See TracChangeset
for help on using the changeset viewer.