Plugin Directory

Changeset 3297270


Ignore:
Timestamp:
05/20/2025 10:52:49 AM (10 months ago)
Author:
bitcraftx
Message:

Fixed Buyer name hide and show issue

Location:
product-purchase-notifications/trunk
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • product-purchase-notifications/trunk/product-purchase-notifications.php

    r3291824 r3297270  
    44 *
    55 * Plugin Name: Product Purchase Notifications
    6  * Version: 1.1
     6 * Version: 1.1.2
    77 * Description: Generate Notifications for latest order Placed on the site
    88 * Author: Bitcraftx
     
    4040{
    4141    private $bitcx_ppn_notifyMe_nonce;
    42     private $plugin_version = '1.1';
     42    private $plugin_version = '1.1.2';
    4343    /**
    4444     * constructor
  • product-purchase-notifications/trunk/public/js/script.js

    r3291824 r3297270  
    5050                            result = '';
    5151                            if (document.hasFocus) {
    52                                setTimeout(bitcx_ppn_Notify_me.generatepopup, bitcx_ppn_Notify_me.showNextIn_ms);
     52                                setTimeout(bitcx_ppn_Notify_me.generatepopup, bitcx_ppn_Notify_me.showNextIn_ms);
    5353                            }
    5454                        }
     
    8484        },
    8585        dynamicHtml: function (record) {
    86             if (record.buyer) {
    87                 var buyerName = record.buyer.charAt(0).toUpperCase() + record.buyer.slice(1);
    88             } else {
    89                 buyerName = "SomeOne";
     86            let buyerName = "SomeOne";
     87
     88            if (record.buyer && record.notify_showOrHideName == 1) {
     89                buyerName = record.buyer.charAt(0).toUpperCase() + record.buyer.slice(1);
     90            } else if (!record.notify_showOrHideName) {
     91                buyerName = ""; // hide the buyer name
    9092            }
    9193            var bannerElement = document.querySelector(".bitcx-ppn-notification-banner");
  • product-purchase-notifications/trunk/readme.txt

    r3291824 r3297270  
    55Requires at least: 6.0
    66Tested up to: 6.8
    7 Stable tag: 1.1
     7Stable tag: 1.1.2
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5454
    5555== Changelog ==
     56= 1.1.2 =
     57* Fix Buyer name hide and show issue.
    5658
    5759= 1.1 =
Note: See TracChangeset for help on using the changeset viewer.