Plugin Directory

Changeset 3450272


Ignore:
Timestamp:
01/30/2026 09:27:27 AM (6 weeks ago)
Author:
dashedslug
Message:

Adding version 6.4.1 of wallets

Location:
wallets/trunk
Files:
20 added
20 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • wallets/trunk/adapters/class-bank-fiat-adapter.php

    r3183058 r3450272  
    159159
    160160    public function get_wallet_version(): string {
    161         return '6.4.0';
     161        return '6.4.1';
    162162    }
    163163
     
    690690                    get_asset_path( 'wallets-admin-deposit-tool' ),
    691691                    [ 'jquery' ],
    692                     '6.4.0',
     692                    '6.4.1',
    693693                    true
    694694                );
  • wallets/trunk/adapters/class-bitcoin-core-like-wallet-adapter.php

    r3183058 r3450272  
    738738                [
    739739                    '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',
    741741                    'headers'     => [
    742742                        'Accept-Encoding: gzip',
  • wallets/trunk/admin/assets.php

    r3183058 r3450272  
    2222                get_asset_path( 'wallets-admin', 'style' ),
    2323                [],
    24                 '6.4.0'
     24                '6.4.1'
    2525            );
    2626
     
    5252                get_asset_path( 'wallets-admin-menu-item' ),
    5353                [ 'jquery' ],
    54                 '6.4.0',
     54                '6.4.1',
    5555                true
    5656            );
     
    6060                get_asset_path( 'wallets-admin-cs-tool' ),
    6161                [ 'jquery-qrcode' ],
    62                 '6.4.0',
     62                '6.4.1',
    6363                true
    6464            );
     
    7575                get_asset_path( 'wallets-admin-capabilities' ),
    7676                [ 'jquery-ui-tabs' ],
    77                 '6.4.0',
     77                '6.4.1',
    7878                true
    7979            );
     
    8383                get_asset_path( 'wallets-admin-dashboard' ),
    8484                [ 'jquery-ui-tabs', 'jqcloud' ],
    85                 '6.4.0',
     85                '6.4.1',
    8686                true
    8787            );
     
    9191                get_asset_path( 'wallets-admin-docs' ),
    9292                [ 'jquery' ],
    93                 '6.4.0',
     93                '6.4.1',
    9494                true
    9595            );
     
    9999                get_asset_path( 'wallets-admin-editor' ),
    100100                [ 'suggest' ],
    101                 '6.4.0',
     101                '6.4.1',
    102102                true
    103103            );
  • wallets/trunk/admin/dashboard.php

    r3183058 r3450272  
    349349        global $wpdb;
    350350
    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';
    353353        $debug_data[ (string) __( 'Web Server', 'wallets' ) ]             = $_SERVER['SERVER_SOFTWARE'];
    354354        $debug_data[ (string) __( 'PHP version', 'wallets' ) ]            = PHP_VERSION;
  • wallets/trunk/admin/settings.php

    r3183058 r3450272  
    3131const DEFAULT_RATES_VS = [ 'btc', 'usd' ];
    3232const DEFAULT_CRON_EMAILS_MAX_BATCH_SIZE = 8;
     33const DEFAULT_CRON_EMAILS_MAX_RECIPIENTS_BATCH_SIZE = 20;
    3334const DEFAULT_DISABLE_CACHE = false;
    3435const DEFAULT_TRANSIENTS_BROKEN = false;
     
    471472
    472473            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(
    473495                'wallets_confirm_move_user_enabled',
    474496                sprintf( (string) __( '%s Move confirm links', 'wallets' ), '🔗' ),
  • wallets/trunk/cron/class-email-queue-task.php

    r2887566 r3450272  
    2424        $this->task_start_time = time();
    2525
    26         $email_queue = json_decode( get_ds_option( 'wallets_email_queue', '[]' ) );
     26        $email_queue = json_decode( get_ds_option( 'wallets_email_queue', '[]' ), true );
    2727
    2828        $max_batch_size = absint(
     
    3333        );
    3434
     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
    3543        $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
    3747            $email_args = array_shift( $email_queue );
     48            $recipients = $email_args[0] ?? '';
    3849
    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 ) );
    4053
    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 );
    4679                }
    4780            }
    4881
    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 ) ) );
    6084        }
    6185    }
  • wallets/trunk/docs/settings.md

    r3183058 r3450272  
    174174
    175175Sending 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
     186How 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.
    176187
    177188
  • wallets/trunk/frontend/assets.php

    r3183058 r3450272  
    2323            get_asset_path( 'wallets', 'style' ),
    2424            [],
    25             '6.4.0'
     25            '6.4.1'
    2626        );
    2727
     
    8686            get_asset_path( 'jsqrcode' ),
    8787            [ 'jquery' ],
    88             '6.4.0',
     88            '6.4.1',
    8989            true
    9090        );
     
    128128            get_asset_path( 'wallets-front' ),
    129129            [ 'knockout', 'jquery', 'style-scoped', 'sprintf.js' ],
    130             '6.4.0',
     130            '6.4.1',
    131131            true
    132132        );
  • wallets/trunk/readme.txt

    r3183058 r3450272  
    44Tags: wallet, bitcoin, cryptocurrency, altcoin, custodial
    55Requires at least: 6.0
    6 Tested up to: 6.6.2
     6Tested up to: 6.9
    77Requires PHP: 7.0
    8 Stable tag: 6.4.0
     8Stable tag: 6.4.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    337337
    338338== 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.
    339342
    340343= 6.4.0 =
     
    516519== Upgrade Notice ==
    517520
    518 Version `6.4.0` improves performance of the plugin.
     521Version `6.4.1` adresses an issue where emails with too many recipients would be rejected by SMTP servers.
    519522
    520523== Donating ==
  • wallets/trunk/wallets.php

    r3183058 r3450272  
    33 * Plugin Name:         Bitcoin and Altcoin Wallets
    44 * Description:         Custodial cryptocurrency wallets.
    5  * Version:             6.4.0
     5 * Version:             6.4.1
    66 * Plugin URI:          https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin
    77 * Requires at least:   6.0
     
    1515 *
    1616 * @author    Alexandros Georgiou <info@dashed-slug.net>
    17  * @copyright 2024 Alexandros Georgiou
     17 * @copyright 2026 Alexandros Georgiou
    1818 * @license   GPL-2.0-or-later
    1919 * @since     1.0.0
     
    3535    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    3636
    37     Copyright 2024 Alexandros Georgiou
     37    Copyright 2026 Alexandros Georgiou
    3838 */
    3939
Note: See TracChangeset for help on using the changeset viewer.