Plugin Directory

Changeset 3488343


Ignore:
Timestamp:
03/22/2026 05:52:17 PM (9 days ago)
Author:
digitallychee
Message:

Release 1.1.1 - Fix email trigger argument mismatch

Location:
dl-gift-wallet
Files:
5 edited
12 copied

Legend:

Unmodified
Added
Removed
  • dl-gift-wallet/tags/1.1.1/changelog.txt

    r3474779 r3488343  
    11*** DL Gift Wallet ***
     2
     32026-03-22 - version 1.1.1
     4* Fix: Corrected email trigger argument mismatch to prevent potential PHP errors.
     5* Fix: Resolved email class lookup issue in test email handler.
    26
    372026-03-03 - version 1.1.0
  • dl-gift-wallet/tags/1.1.1/dl-gift-wallet.php

    r3474779 r3488343  
    33 * Plugin Name: DL Gift Wallet
    44 * Description: Allow customers to purchase gift credit that is automatically added to a recipient’s store account as balance.
    5  * Version: 1.1.0
     5 * Version: 1.1.1
    66 * Requires at least: 6.0
    77 * Requires PHP: 8.3
    88 * WC requires at least: 8.0
    9  * WC tested up to: 10.5.3
     9 * WC tested up to: 10.6.1
    1010 * Author: Digital Lychee Creative Limited
    1111 * Author URI: https://digitallychee.com
     
    517517        $emails = WC()->mailer()->get_emails();
    518518
    519         if ( empty( $emails['DL_Gift_Wallet_Email_Gift_Received'] ) ) {
     519        $email_id = 'dl_gift_wallet_gift_received';
     520
     521        if ( empty( $emails[ $email_id ] ) ) {
    520522            add_action('admin_notices', function () {
    521523                echo '<div class="notice notice-error"><p>' .
     
    527529
    528530        /** @var DL_Gift_Wallet_Email_Gift_Received $email */
    529         $email = $emails['DL_Gift_Wallet_Email_Gift_Received'];
     531        $email = $emails[ $email_id ];
    530532
    531533        ob_start();
     
    534536            __('Test Sender', 'dl-gift-wallet'),
    535537            __('This is a test gift email from Gift Wallet.', 'dl-gift-wallet'),
    536             25
     538            25,
     539            $this->get_default_gift_image_url()
    537540        );
    538541        $buffer = ob_get_clean();
     
    548551        });
    549552    }
     553
     554        public function set_preview_data($data)
     555{
     556    $this->object = (object) array(
     557        'from_name'   => isset($data['from_name']) ? sanitize_text_field($data['from_name']) : __('A friend', 'dl-gift-wallet'),
     558        'message'     => isset($data['message']) ? wp_kses_post($data['message']) : '',
     559        'amount'      => isset($data['amount']) ? (float) $data['amount'] : 25,
     560        'artwork_url' => isset($data['artwork_url']) ? esc_url_raw($data['artwork_url']) : '',
     561    );
     562}
    550563
    551564    /* -------------------------------------------------------------------------
  • dl-gift-wallet/tags/1.1.1/includes/emails/class-dl-gift-wallet-email-gift-received.php

    r3474779 r3488343  
    9898     * @param float  $gift_total_base  Amount in store base currency.
    9999     */
    100     public function trigger($recipient_email, $from_name, $message, $gift_total_base)
     100    public function trigger($recipient_email, $from_name, $message, $gift_total_base, $artwork_url = '')
    101101    {
    102102        $this->setup_locale();
     
    107107            'message' => $message,
    108108            'amount' => (float) $gift_total_base,
     109            'artwork_url' => esc_url_raw($artwork_url),
    109110        );
    110111
  • dl-gift-wallet/tags/1.1.1/readme.txt

    r3474779 r3488343  
    55Tested up to: 6.9
    66Requires PHP: 8.3
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    247247
    248248== Changelog ==
     249
     250= 1.1.1 =
     251* Fix: Corrected email trigger argument mismatch to prevent potential PHP errors.
     252* Fix: Resolved email class lookup issue in test email handler.
    249253
    250254= 1.1.0 =
     
    295299= Upgrade Notice =
    296300
    297 = 1.1.0 =
    298 Gift emails are now managed via WooCommerce → Settings → Emails. Existing email settings are migrated automatically.
     301= 1.1.1 =
     302Fixes a minor email handling issue. No action required.
  • dl-gift-wallet/trunk/changelog.txt

    r3474779 r3488343  
    11*** DL Gift Wallet ***
     2
     32026-03-22 - version 1.1.1
     4* Fix: Corrected email trigger argument mismatch to prevent potential PHP errors.
     5* Fix: Resolved email class lookup issue in test email handler.
    26
    372026-03-03 - version 1.1.0
  • dl-gift-wallet/trunk/dl-gift-wallet.php

    r3474779 r3488343  
    33 * Plugin Name: DL Gift Wallet
    44 * Description: Allow customers to purchase gift credit that is automatically added to a recipient’s store account as balance.
    5  * Version: 1.1.0
     5 * Version: 1.1.1
    66 * Requires at least: 6.0
    77 * Requires PHP: 8.3
    88 * WC requires at least: 8.0
    9  * WC tested up to: 10.5.3
     9 * WC tested up to: 10.6.1
    1010 * Author: Digital Lychee Creative Limited
    1111 * Author URI: https://digitallychee.com
     
    517517        $emails = WC()->mailer()->get_emails();
    518518
    519         if ( empty( $emails['DL_Gift_Wallet_Email_Gift_Received'] ) ) {
     519        $email_id = 'dl_gift_wallet_gift_received';
     520
     521        if ( empty( $emails[ $email_id ] ) ) {
    520522            add_action('admin_notices', function () {
    521523                echo '<div class="notice notice-error"><p>' .
     
    527529
    528530        /** @var DL_Gift_Wallet_Email_Gift_Received $email */
    529         $email = $emails['DL_Gift_Wallet_Email_Gift_Received'];
     531        $email = $emails[ $email_id ];
    530532
    531533        ob_start();
     
    534536            __('Test Sender', 'dl-gift-wallet'),
    535537            __('This is a test gift email from Gift Wallet.', 'dl-gift-wallet'),
    536             25
     538            25,
     539            $this->get_default_gift_image_url()
    537540        );
    538541        $buffer = ob_get_clean();
     
    548551        });
    549552    }
     553
     554        public function set_preview_data($data)
     555{
     556    $this->object = (object) array(
     557        'from_name'   => isset($data['from_name']) ? sanitize_text_field($data['from_name']) : __('A friend', 'dl-gift-wallet'),
     558        'message'     => isset($data['message']) ? wp_kses_post($data['message']) : '',
     559        'amount'      => isset($data['amount']) ? (float) $data['amount'] : 25,
     560        'artwork_url' => isset($data['artwork_url']) ? esc_url_raw($data['artwork_url']) : '',
     561    );
     562}
    550563
    551564    /* -------------------------------------------------------------------------
  • dl-gift-wallet/trunk/includes/emails/class-dl-gift-wallet-email-gift-received.php

    r3474779 r3488343  
    9898     * @param float  $gift_total_base  Amount in store base currency.
    9999     */
    100     public function trigger($recipient_email, $from_name, $message, $gift_total_base)
     100    public function trigger($recipient_email, $from_name, $message, $gift_total_base, $artwork_url = '')
    101101    {
    102102        $this->setup_locale();
     
    107107            'message' => $message,
    108108            'amount' => (float) $gift_total_base,
     109            'artwork_url' => esc_url_raw($artwork_url),
    109110        );
    110111
  • dl-gift-wallet/trunk/readme.txt

    r3474779 r3488343  
    55Tested up to: 6.9
    66Requires PHP: 8.3
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    247247
    248248== Changelog ==
     249
     250= 1.1.1 =
     251* Fix: Corrected email trigger argument mismatch to prevent potential PHP errors.
     252* Fix: Resolved email class lookup issue in test email handler.
    249253
    250254= 1.1.0 =
     
    295299= Upgrade Notice =
    296300
    297 = 1.1.0 =
    298 Gift emails are now managed via WooCommerce → Settings → Emails. Existing email settings are migrated automatically.
     301= 1.1.1 =
     302Fixes a minor email handling issue. No action required.
Note: See TracChangeset for help on using the changeset viewer.