Plugin Directory

Changeset 3264157


Ignore:
Timestamp:
03/30/2025 09:51:38 PM (11 months ago)
Author:
walletup
Message:

Wallet Up 4.1.0 Full Upgraded UI/UX / New Features Added / Composer / Onboarded React 18

Location:
wallet-up/trunk
Files:
672 added
2 edited

Legend:

Unmodified
Added
Removed
  • wallet-up/trunk/readme.txt

    r3251381 r3264157  
    11=== Wallet Up ===
    22Contributors: walletup
    3 Tags: QR code payments, cash app, Venmo, zelle, facebook pay
    4 Requires at least: 4.8
    5 Tested up to: 6.8
    6 Requires PHP: 5.1
    7 Stable tag: 3.4.9
     3Tags: QR code payments, Cash App, Venmo, Zelle, PayPal, Meta Pay, URL shortener, payment tracking, analytics, donations, WooCommerce
     4Requires at least: 5.8
     5Tested up to: 6.8.0
     6Requires PHP: 7.4
     7Stable tag: 4.1.0
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
    1010Donate Link: https://walletup.app/donate
    11 Wallet Up Simplify online payments with QR codes for Zelle, Cash App, Venmo, PayPal, and more.
    12 
     11
     12Integrate Cash App, Venmo, Zelle, PayPal, and more with customizable QR codes with Logo, URL shortening, Digital Business Card Generator, real-time tracking, and comprehensive payment solutions.
    1313
    1414== Description ==
    1515
    16 The Wallet Up "Virtual Wallet" has it all: Easily Integrate Zelle, Facebook pay, Cash App, Venmo, PayPal with a generated QR Code anywhere on your Online Web Site. Get started now!
    17 
    18 
    19 = What is Wallet Up? =
    20 Wallet UP or Wal’UP is a Trademark of Wallet UP LLC.
    21 
    22 Wallet Up simplifies online payments for businesses and organizations.
    23 Easily integrate popular peer-to-peer payment methods like Zelle, Cash App, Venmo, and PayPal with a generated QR code on your website.
    24 No more juggling multiple apps – Wallet Up puts the power of digital wallets at your fingertips.
    25 
    26 = Disclaimers =
    27 Logos, Brand names and Trademarks
    28 All the logos used to display any of our products are owned by their authors. Such like Facebook, Venmo, Zelle, Cash App, Paypal etc. No Brands Names, Logos or Names (except those exclusively owned or related to Wallet Up LLC) are endorsing in any manner, shape or form our products.
    29 
    30 
    31 
    32 
    33 = Features =
    34 * Accepts one-off donations or funds via Cash App
    35 * Accepts one-off donations or funds via Paypal.me
    36 * Accepts one-off donations or funds via Zelle
    37 * Accepts one-off donations or funds via Venmo
    38 * Accepts one-off donations or funds via Facebook Pay
    39 
     16**Wallet Up** (or Wal'UP) is your all-in-one payment solution for WordPress. Seamlessly integrate popular payment methods, generate beautiful QR codes, track analytics in real-time, and enhance your WooCommerce store with powerful payment options.
     17
     18= Core Features =
     19
     20* **Multi-Payment Integration:** Accept payments via Cash App, Venmo, PayPal, Zelle, Meta Pay (formerly Facebook Pay), and WalupPay
     21* **Advanced QR Code Generator:** Create and customize QR codes with logos, colors, styles, and more (Pro Only)
     22* **URL Shortener & Analytics:** Generate shortened URLs with real-time click tracking and comprehensive analytics (Pro Only)
     23* **Real-Time Click Tracker:** Monitor and analyze URL performance with instant notifications (Pro Only)
     24* **Donation System:** Set up customizable donation pages with analytics and tracking (Pro Only)
     25* **WooCommerce Integration:** Seamlessly integrate with WooCommerce checkout
     26* **WPForms Integration:** Add payment options to your forms (Pro Only)
     27* **Digital Business Card Generator:** Create scannable business cards with payment information (Pro Only)
     28
     29= QR Code Features (Pro Only) =
     30
     31* **Logo Integration:** Add your logo to the center of QR codes
     32* **Customizable Styles:** Choose from rounded, circular, or classic QR code styles
     33* **Color Customization:** Select custom colors for QR code foreground and background
     34* **Border Options:** Customize borders and margins
     35* **Responsive Design:** QR codes adapt to different device sizes
     36* **SVG Support:** Generate high-quality vector QR codes
     37* **Preview Feature:** Real-time preview while customizing
     38
     39= URL Shortener & Analytics (Pro Only) =
     40
     41* **Custom URL Shortening:** Create branded short links
     42* **Click Tracking:** Monitor clicks in real-time
     43* **Geographic Analytics:** Track visitor locations
     44* **Referrer Tracking:** See where traffic comes from
     45* **Custom Slugs:** Create memorable URLs
     46* **Expiration Settings:** Set links to expire after a specific time
     47* **Tags & Organization:** Categorize and organize your links
     48* **Export Data:** Download analytics as CSV
     49
     50= Donation System (Pro Only) =
     51
     52* **Customizable Donation Pages:** Create beautiful donation pages
     53* **Multiple Payment Methods:** Accept donations through various channels
     54* **QR Code Donations:** Generate scannable donation QR codes
     55* **Donation Analytics:** Track and analyze donation patterns
     56* **Custom Thank You Pages:** Design personalized thank you experiences
     57* **Donation Management:** Organize and track all donations
     58
     59= WooCommerce Integration =
     60
     61* **Checkout Integration:** Add Wallet Up payment methods to WooCommerce checkout
     62* **Order Management:** Track payments in WooCommerce orders
     63* **Custom Thank You Page:** Display payment QR codes on order confirmation
     64* **Blocks Support:** Compatible with WooCommerce Blocks checkout
     65
     66= Developer Features =
     67
     68* **Extensible Architecture:** Well-documented hooks and filters
     69* **React Components:** Modern UI built with React
     70* **API Endpoints:** Integrate with external services
     71* **Shortcode System:** Easily embed features anywhere
     72* **Theme Compatibility:** Works with any WordPress theme
     73* **Mobile-First Design:** Optimized for all devices
    4074
    4175== Installation ==
     
    4377= Minimum Requirements =
    4478
    45 * WordPress 4.8 or greater
    46 * PHP version 5.6 or greater
    47 * MySQL version 5.0.15 or greater
    48 * cURL version 5.40 or higher
    49 * An SSL certificate
    50 
    51 = Automatic installation =
    52 
    53 Automatic installation is the easiest option as WordPress handles the file transfers itself and you don't need to leave your web browser. To do an automatic install of "WalUp" or "Wallet Up", log in to your WordPress dashboard, navigate to the Plugins menu and click "Add New".
    54 
    55 In the search field type "WalUp" or "Wallet Up" and click Search Plugins. Once you have found the plugin you can view details about it such as the point release, rating and description. Most importantly of course, you can install it by simply clicking "Install Now".
    56 
    57 = Manual installation =
    58 
    59 The manual installation method involves downloading our wallet plugin and uploading it to your server via your favorite FTP application. The WordPress codex contains [instructions on how to do this here](https://codex.wordpress.org/Managing_Plugins#Manual_Plugin_Installation).
     79* WordPress 5.8 or greater
     80* PHP version 7.4 or greater
     81* MySQL version 5.7 or greater
     82* SSL certificate for secure connections
     83* GD or Imagick extension for advanced QR code features (optional)
     84
     85= Automatic Installation =
     86
     871. Navigate to **Plugins > Add New** in your WordPress dashboard
     882. Search for "Wallet Up"
     893. Click "Install Now" and then "Activate"
     904. Go to **Wallet Up** in your admin menu to configure settings
     91
     92= Manual Installation =
     93
     941. Download the plugin ZIP file
     952. Navigate to **Plugins > Add New > Upload Plugin**
     963. Choose the downloaded ZIP file and click "Install Now"
     974. Activate the plugin through the **Plugins** menu
     98
     99= After Installation =
     100
     1011. Configure your payment methods in the Wallet Up settings
     1022. Set up your QR code display preferences
     1033. Create your first shortened URL
     1044. Add payment options to your site using shortcodes
     105
     106== Frequently Asked Questions ==
     107
     108= Which payment methods does Wallet Up support? =
     109
     110Wallet Up supports Cash App, Venmo, PayPal, Zelle, Meta Pay (formerly Facebook Pay), and WalupPay.
     111
     112= Do I need technical knowledge to use Wallet Up? =
     113
     114No, Wallet Up is designed to be user-friendly with an intuitive interface. Simply configure your settings and use shortcodes to add functionality to your site.
     115
     116= Can I customize the appearance of QR codes? =
     117
     118Yes! You can customize colors, size, style (rounded, circular, or classic), add your logo, adjust borders, and more.
     119
     120= How do I track payments made through QR codes? =
     121
     122Wallet Up includes comprehensive analytics for tracking QR code scans, link clicks, and payment interactions through the Analytics dashboard. However payments made are logged and hamdled directly through their respective platform provider.
     123
     124= Does Wallet Up work with WooCommerce? =
     125
     126Yes, Wallet Up integrates seamlessly with WooCommerce, allowing you to offer alternative payment methods at checkout.
     127
     128= Can I create donation pages with Wallet Up? =
     129
     130Yes, the donation system allows you to create customizable donation pages with multiple payment options and real-time tracking.
     131
     132= Is the URL shortener included in the free version? =
     133
     134No, the URL shortener and analytics is included in the Pro version. Advanced analytics and real-time tracking are available in the Pro version.
     135
     136= Does Wallet Up comply with GDPR requirements? =
     137
     138Yes, Wallet Up is designed with privacy in mind and complies with GDPR requirements. The plugin only collects necessary data for functionality and provides options for data management.
     139
     140= Can I use Wallet Up with WPForms? =
     141
     142Yes, Wallet Up integrates with WPForms to add payment options to your forms, making it easy to collect payments.
     143
     144= Do you offer support? =
     145
     146Yes, we offer support through our website and WordPress.org forums. Premium users receive priority support.
     147
     148== Screenshots ==
     149
     1501. Fresh Admin Dashboard with Modern UI
     1512. Multi-Payment Method Configuration
     1523. Advanced QR Code Customization  (Pro Only)
     1534. URL Shortener & Real-time Analytics  (Pro Only)
     1545. WooCommerce Integration at Checkout
     1556. Digital Business Card Generator  (Pro Only)
     1567. Donation System Setup  (Pro Only)
     1578. Analytics Dashboard with Detailed Reports  (Pro Only)
     1589. WPForms Payment Integration  (Pro Only)
     15910. Real-time Click Tracking Interface  (Pro Only)
     16011. Shortcode Generator and Usage  (Pro Only)
     161
     162== Changelog ==
     163
     164= 4.1.0 - March 08, 2025 =
     165* **New:** URL shortener with real-time click tracking and analytics (Pro Only)
     166* **New:** Advanced QR code styles with logo integration and customization options (Pro Only)
     167* **New:** Improved donation system with QR code options and analytics (Pro Only)
     168* **New:** Robust notification system for tracking events and user interactions (Pro Only)
     169* **Enhanced:** Complete redesign of admin interface with modern components
     170* **Enhanced:** Better WooCommerce checkout integration with blocks support
     171* **Enhanced:** Improved WPForms integration for payment processing (Pro Only)
     172* **Fixed:** Various QR code generation issues and image handling improvements
     173* **Fixed:** PHP compatibility issues for better hosting support
     174* **Security:** Enhanced input validation and output sanitization
     175* **Security:** Fixed potential command injection vulnerability
     176* **Performance:** Optimized database queries and caching for faster load times
     177
     178= 4.0.9 - February 06, 2025 =
     179* **New:** Fully responsive admin interface with nested tabs for better organization
     180* **Enhanced:** Analytics with dynamic charts and export options (Pro Only)
     181* **Improved:** QR code preview within settings for instant feedback
     182* **Updated:** Dependency management for React 18 compatibility
     183* **Fixed:** Minor bugs related to UI responsiveness on mobile devices
     184* **Security:** Additional checks for input validation and sanitization
     185* **Security:** Freemius Update
     186
     187= 4.0.8 - January 15, 2025 =
     188* **Added:** Comprehensive analytics tracking system (Pro Only)
     189* **Added:** Real-time QR code scan monitoring (Pro Only)
     190* **Added:** Click and impression tracking (Pro Only)
     191* **Added:** Method-specific analytics (Pro Only)
     192* **Improved:** Performance optimizations
     193* **Fixed:** QR code navigation issues
     194
     195= 4.0.0 - January 4, 2025 =
     196* Major release with complete React-based admin interface
     197* Rebuilt from ground up with modern architecture
     198* **New features:**
     199  * Modernized admin dashboard with real-time updates
     200  * Enhanced QR code generation with GD/Imagick support
     201  * Advanced display customization options (Pro Only)
     202  * Improved shortcode system
     203  * Better payment method integration
     204  * Enhanced security features
     205
     206* **Technical improvements:**
     207  * React 18 integration
     208  * Modern build system with Vite
     209  * Improved performance and loading times
     210  * Better WordPress integration
     211  * Enhanced error handling
     212
     213* **UI/UX improvements:**
     214  * New intuitive admin interface
     215  * Better mobile responsiveness
     216  * Improved accessibility
     217  * Enhanced visual customization
     218
     219* **Breaking changes:**
     220  * New configuration format
     221  * Updated shortcode parameters
     222  * Changed minimum requirements:
     223    * WordPress 5.8+
     224    * PHP 7.4+
     225    * Modern browser support
     226
     227= 3.4.1 - November 29, 2024 =
     228* Overall improvements
     229* Freemius update
     230
     231= 3.4.0 - November 19, 2024 =
     232* **Enhancement:** Replaced deprecated Google Charts API for QR code generation with GoQR.me API
     233* **Improved Reliability:** More consistent QR code generation
     234* **Security Update:** Mitigated potential security risks from outdated libraries
     235* WordPress 6.6 compatibility
     236
     237= 3.3.5 - October 27, 2024 =
     238* Fix settings display issues
     239
     240= 3.3.4 - October 16, 2024 =
     241* **Improved Shortcode Usage:** Enhanced feature that conditionally adds space before dollar sign
     242* **Bug Fixes:** Various fixes for smoother operation
     243* **Performance Improvements:** Optimization for faster loading
     244* **Security Updates:** Protection against potential vulnerabilities
     245
     246= 3.3.0 - September 16, 2024 =
     247* WordPress 6.5 compatibility
     248* Security: Patch Update 2.5.12 for vulnerability in freemius
     249
     250= 3.2.9 - August 1, 2024 =
     251* Security: Patch Update 2.5.10 for vulnerability in freemius
     252
     253= 3.2.8 - July 5, 2024 =
     254* Security: Patch for vulnerability in freemius
     255
     256= 3.2.7 - May 5, 2024 =
     257* Update: WordPress 6.4 Compatibility
     258
     259= 3.2.6 - March 24, 2024 =
     260* Added: Optional user feedback system to improve functionality
     261
     262= 3.2.5 - March 3, 2024 =
     263* Fixed: Update plugin in Admin Dashboard failure
     264
     265= 3.2.4 - March 3, 2024 =
     266* Minor tweaks and fixes for improved experience
     267
     268= 3.2.3 - November 10, 2023 =
     269* Update: General Terms
     270
     271= 3.2.2 - November 02, 2023 =
     272* Update: WordPress 6.3 compatibility update
     273
     274= 3.2.1 - October 01, 2023 =
     275* Fixed: Assets Display Adjustment
     276
     277= 3.2.0 - July 02, 2023 =
     278* **New Feature:** Facebook Pay (now Meta Pay) integration
     279* Security and overall improvements
     280
     281= 3.1.0 - May 07, 2023 =
     282* **New Feature:** Zelle integration
     283* Security and overall improvements
     284
     285= 3.0.0 - Feb 18, 2023 =
     286* Initial Public Release
     287* Supports: Cash App, Venmo, PayPal
    60288
    61289== Upgrade Notice ==
    62290
    63 Automatic updates should work smoothly; as always though, ensure you backup your site just in case.
    64 
    65 
    66 == Frequently Asked Questions ==
    67 
    68 After activation go to Wallet Up settings to set up your accounts profiles. Visit https://walletup.app/wallet-up for a demo.
    69 
    70 Find more on www.walletup.app
    71 
    72 = What do we support? =
    73 
    74 Now Wallet Up plugin supports Cash App, Venmo, PayPal, Zelle and Facebook Pay.
    75 More are coming soon.
    76 
    77 
    78 == Screenshots ==
    79 1. QR codes and Links generators
    80 2. WPForms Shortcode integration
    81 3. Global Settings screen
    82 4. ShortCodes combinations =
    83 5. General Info Home
    84 6. General Desc
    85 7. Who can use it
    86 
    87 == Changelog ==
    88 = 3.4.9 February 6, 2025 =
    89 * Introducing Wallet Up 4.0
    90 * Freemius update
    91 * WordPress compatibility
    92 
    93 
    94 == Changelog ==
    95 = 3.4.1 June 29, 2024 =
    96 * Overall Improvements
    97 * Freemius update
    98 
    99 = 3.4.0 June 19, 2024 =
    100 * Enhancement: Replaced deprecated Google Charts API for QR code generation with the actively maintained GoQR.me API.
    101 * Improved Reliability: Ensured more consistent and reliable QR code generation for enhanced user experience.
    102 * Security Update: Mitigated potential security risks associated with using outdated libraries.
    103 * Wordpress 6.6 compatibility
    104 
    105 = 3.3.5 February 27, 2024 =
    106 * Fix setting display issue
    107 
    108 = 3.3.4 February 16, 2024 =
    109 New Features and Enhancements
    110 * Improved Shortcode Usage: The shortcodes now have an enhanced feature that conditionally adds a space before the dollar sign only when an amount is entered. This prevents unnecessary spaces when no amount is specified.
    111 * Bug Fixes: Various bug fixes have been implemented to ensure the plugin operates smoothly and without issues.
    112 * Performance Improvements: The plugin has been optimized for better performance, ensuring that it loads quickly and runs efficiently.
    113 * Security Updates: Security enhancements have been made to protect against potential vulnerabilities and ensure the safety of user data.
    114 
    115 = 3.3.0 September 16, 2023 =
    116 * Wordpress 6.3.1 compatibility
    117 * Security: Patch Update 2.5.12 for vulnerability in freemius
    118 
    119 = 3.2.9 August 1, 2023 =
    120 * Security: Patch Update 2.5.10 for vulnerability in freemius
    121 
    122 = 3.2.8 July 5, 2023 =
    123 * Security: Patch for vulnerability in freemius
    124 
    125 = 3.2.7 May 5, 2023 =
    126 * Update: Wordpress Latest Compatibility 6.2
    127 
    128 = 3.2.6 March 24, 2023 =
    129 * Added: Users can now optionally opt in to provide feedback and help improve user experience and functionalities
    130 
    131 = 3.2.5 March 3, 2023 =
    132 * Fixed: Update plugin in Admin Dashboard failure
    133 
    134 = 3.2.4 March 3, 2023 =
    135 * Minor tweaks and fixes under the hood to improve your experience
    136 
    137 = 3.2.3 November 10, 2022 =
    138 * Update: General Terms
    139 
    140 = 3.2.2 November 02, 2022 =
    141 * Update: Wordpress 6.1 compatibility update
    142 
    143 = 3.2.1 October 01, 2022 =
    144 * Fixed: Assets Display Adjustment
    145 
    146 = 3.2.0 July 02, 2022 =
    147 * New Feature Added: FaceBook Pay (now Meta Pay)
    148 * Security and Overall improvements
    149 
    150 = 3.1.0 May 07, 2022 =
    151 * New Feature Added: Zelle
    152 * Security and Overall improvements
    153 
    154 = 3.0.0 Feb 18, 2022 =
    155 * Initial Public Release
    156 
    157 - Supports:
    158 Cash App
    159 Venmo
    160 Paypal
    161 
    162 <?php code();?>
     291= 4.1.0 =
     292Major update with URL shortener, real-time analytics, improved donation system, and enhanced QR code styles. Backup your site before upgrading.
     293
     294= 4.0.0 =
     295Complete rebuild with modern React interface, improved QR code generation, and enhanced security. Requires WordPress 5.8+ and PHP 7.4+.
     296
     297= 3.4.0 =
     298Replaces deprecated QR code API with more reliable solution. Important update for continued functionality.
     299
     300== Privacy Policy ==
     301
     302Wallet Up is committed to respecting user privacy:
     303
     304* The plugin does not collect personal user data beyond what is necessary for functionality
     305* Analytics data is stored locally on your server
     306* No data is sent to external services without explicit consent
     307* The plugin automatically cleans up old data to minimize storage
     308* All tracking features can be disabled
     309
     310For questions about privacy, please contact [email protected].
     311
     312== Disclaimers ==
     313
     314Wallet Up does not imply endorsement by any of the payment services it integrates with. All logos, brand names, and trademarks are owned by their respective companies.
     315
     316Cash App is a registered trademark of Block, Inc.
     317Venmo is a registered trademark of PayPal, Inc.
     318PayPal is a registered trademark of PayPal, Inc.
     319Zelle is a registered trademark of Early Warning Services, LLC.
     320Meta Pay is a registered trademark of Meta Platforms, Inc.
     321
     322== Support ==
     323
     324For technical support, please visit:
     325
     326* Documentation: https://docs.walletup.app
     327* Support Forums: https://wordpress.org/support/plugin/wallet-up/
     328* Email Support: [email protected]
     329
     330== Contribute ==
     331
     332We welcome contributions to Wallet Up! Visit our GitHub repository to contribute code, report issues, or suggest features.
  • wallet-up/trunk/wallet-up.php

    r3251381 r3264157  
    22/**
    33 * Plugin Name: Wallet Up
    4  * Description: The Wallet Up "Virtual Wallet" has it all: Easily Integrate Zelle, Facebook pay, Cash App, Venmo, PayPal with a generated QR Code anywhere on your Online Web Site. Get started now!
     4 * Description: Welcome to the Next 'UP: Easily Integrate Cash App, Venmo, Zelle, Facebook pay, PayPal with a generated QR Code anywhere on your Online Web Site or with Woocommerce Seller. Now Support URL Shortening and Custom QR Code with Logo. Get started now!
    55 * Plugin URI: https://walletup.app/wallet-up
    66 * Author: WalletUp.app
    7  * Version: 3.4.9
     7 * Version: 4.1.0
     8 * Requires at least: 5.8
     9 * Requires PHP: 7.4
    810 * Author URI: https://walletup.app/
    9  *
    1011 * Text Domain: walletup
    11  *
    1212 * @package Wallet Up
    1313 * @category Core
    14  *
    15  * Wallet Up is free software: you can redistribute it and/or modify
    16  * it under the terms of the GNU General Public License as published by
    17  * the Free Software Foundation, either version 3 of the License, or
    18  * any later version.
    19  *
    20  * Wallet Up is distributed in the hope that it will be useful,
    21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    23  * GNU General Public License for more details.
    2414 */
    25 // Exit if accessed directly
    26 if ( !defined( 'ABSPATH' ) ) {
    27     exit;
    28 }
    29 
    30 // Check if Freemius SDK is already initialized
     15 
     16
     17if (!defined('ABSPATH')) {
     18    exit; // Exit if accessed directly.
     19}
    3120if ( ! function_exists( 'wallet_up_fs' ) ) {
    32     // Initialize Freemius SDK
     21    // Create a helper function for easy SDK access.
    3322    function wallet_up_fs() {
    3423        global $wallet_up_fs;
    3524
    3625        if ( ! isset( $wallet_up_fs ) ) {
    37             // Include Freemius SDK
    38             require_once dirname(__FILE__) . '/freemius/start.php';
    39 
     26            // Include Freemius SDK.
     27            require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
    4028            $wallet_up_fs = fs_dynamic_init( array(
    4129                'id'                  => '12319',
    4230                'slug'                => 'wallet-up',
     31                'premium_slug'        => 'wallet-up-pro',
    4332                'type'                => 'plugin',
    4433                'public_key'          => 'pk_d19cef6c52dca0f60e60df34f248e',
    4534                'is_premium'          => false,
     35                'premium_suffix'      => 'Pro',
     36                // If your plugin is a serviceware, set this option to false.
     37                'has_premium_version' => true,
    4638                'has_addons'          => false,
    47                 'has_paid_plans'      => false,
     39                'has_paid_plans'      => true,
     40                'trial'               => array(
     41                    'days'               => 7,
     42                    'is_require_payment' => true,
     43                ),
    4844                'menu'                => array(
    4945                    'slug'           => 'wallet-up',
    5046                    'first-path'     => 'admin.php?page=wallet-up',
    51                     'account'        => false,
    5247                    'support'        => false,
    5348                ),
     
    5853    }
    5954
    60     // Call the Freemius initialization function
     55    // Init Freemius.
    6156    wallet_up_fs();
    62     // Signal that SDK was initiated
     57    // Signal that SDK was initiated.
    6358    do_action( 'wallet_up_fs_loaded' );
    6459}
    6560
    66 // Include necessary WordPress Core files
    67 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    68 include_once( ABSPATH . 'wp-includes/pluggable.php' );
    69 include_once( ABSPATH . 'wp-includes/option.php' );
    70 
    71 // Add filters for shortcode support in widgets
    72 add_filter( 'widget_text', 'shortcode_unautop' );
    73 add_filter( 'widget_text', 'do_shortcode' );
    74 
    75 // Define plugin paths
    76 define( 'WALLET_UP_VERSION', '3.4.9');
    77 
    78 define( 'WALLET_UP_BASE_DIR', plugin_dir_path( __FILE__ ) );
    79 define( 'WALLET_UP_BASENAME', plugin_basename( __FILE__ ) );
    80 define( 'WALLET_UP_BASE_URL', plugins_url( '/', __FILE__ ) );
    81 
    82 // Define plugin admin access capability
    83 if ( !defined( 'WALUP_ADMIN_CAP' ) )
    84     define( 'WALUP_ADMIN_CAP', 'manage_options' );
    85 
    86 // Define plugin menu access capability
    87 if ( !defined( 'WALUP_MENU_ACCESS_CAP' ) )
    88     define( 'WALUP_MENU_ACCESS_CAP', 'manage_options' );
    89 
    90 // Define paths to CSS files
    91 if(!defined('WALUP_ADMIN_MIN_CSS'))
    92   define('WALUP_ADMIN_MIN_CSS', WALLET_UP_BASE_URL . 'assets/css/walletup.min.css');
    93 
    94 if(!defined('WALUP_ADMIN_TAB_CSS'))
    95   define('WALUP_ADMIN_TAB_CSS', WALLET_UP_BASE_URL . 'assets/css/walletup.tabs.css');
    96 
    97 if(!defined('WALUP_FONTAWESOME_CSS'))
    98   define('WALUP_FONTAWESOME_CSS', WALLET_UP_BASE_URL . 'assets/css/walletup.fontawesome.css');
    99 
    100 // Initialize the error handler - using getInstance() instead of constructor
    101 require_once WALLET_UP_BASE_DIR . 'Core/Error/ErrorHandler.php';
    102 $errorHandler = \WalletUp\Core\Error\ErrorHandler::getInstance();
    103 
    104 // Upgrade loader - handles smart notices and upgrade features
    105 if (file_exists(WALLET_UP_BASE_DIR . 'Core/UpgradeLoader.php')) {
    106     require_once WALLET_UP_BASE_DIR . 'Core/UpgradeLoader.php';
    107 }
    108 
    109 // Add hooks for feature teasers and smart notices
    110 add_action('wp_dashboard_setup', 'walletup_dashboard_widgets');
    111 add_action('admin_init', 'walletup_check_upgrade_features');
     61// PRE-NAMESPACE SECTION: This must be before the namespace declaration
     62// Check if premium version is active and auto-deactivate if it is
     63if (!function_exists('wallet_up_free_check_premium')) {
     64    function wallet_up_free_check_premium() {
     65        if (!function_exists('is_plugin_active')) {
     66            require_once ABSPATH . 'wp-admin/includes/plugin.php';
     67        }
     68       
     69        $premium_plugin = 'wallet-up-pro/wallet-up.php';
     70        if (is_plugin_active($premium_plugin)) {
     71            // Premium version is active, deactivate ourselves
     72            deactivate_plugins(plugin_basename(__FILE__));
     73           
     74            // Maybe add an admin notice
     75            if (!is_admin()) {
     76                return; // Only continue in admin
     77            }
     78           
     79            add_action('admin_notices', function() {
     80                echo '<div class="notice notice-info is-dismissible"><p>';
     81                echo 'Wallet Up free version has been automatically deactivated because the Pro version is active.';
     82                echo '</p></div>';
     83            });
     84           
     85            // Exit early to avoid loading more code
     86            return true;
     87        }
     88       
     89        return false;
     90    }
     91   
     92    // Run the check - if premium is active, stop execution
     93    if (wallet_up_free_check_premium()) {
     94        return;
     95    }
     96}
     97
     98
     99function wallet_up_check_premium_status_free() {
     100    if (!check_ajax_referer('wallet_up_admin_nonce', 'nonce', false)) {
     101        wp_send_json_error([
     102            'message' => 'Security check failed',
     103        ]);
     104        return;
     105    }
     106    if (!current_user_can('edit_posts')) {
     107        wp_send_json_error([
     108            'message' => 'Permission denied',
     109        ]);
     110        return;
     111    }
     112    $is_premium = false;
     113    $checkout_url = '';
     114    $upgrade_url = '';
     115    if (function_exists('wallet_up_fs') && is_object(wallet_up_fs())) {
     116        $fs = wallet_up_fs();
     117        $is_premium = $fs->can_use_premium_code();
     118        if (method_exists($fs, 'checkout_url')) {
     119            $checkout_url = $fs->checkout_url();
     120        }
     121        if (method_exists($fs, 'get_upgrade_url')) {
     122            $upgrade_url = $fs->get_upgrade_url();
     123        }
     124    }
     125    wp_send_json_success([
     126        'isPremium'   => $is_premium,
     127        'checkoutUrl' => $checkout_url,
     128        'upgradeUrl'  => $upgrade_url,
     129    ]);
     130}
     131
     132add_action('wp_ajax_wallet_up_check_premium_status', 'WalletUp\\wallet_up_check_premium_status_free');
    112133
    113134/**
    114  * Initialize dashboard widgets for Wallet Up
     135 * PHP Version Compatibility Checker
    115136 */
    116 function walletup_dashboard_widgets() {
    117     // Only for users who can manage options
    118     if (!current_user_can('manage_options')) {
    119         return;
    120     }
    121    
    122     // Check if the features already exist
    123     $smartFeaturesExist = class_exists('WalletUp\\Core\\Dashboard\\SmartFeaturesDashboard');
    124    
    125     // Try to load Smart Features Dashboard if not already loaded
    126     if (!$smartFeaturesExist) {
    127         $featureFile = WALLET_UP_BASE_DIR . 'Core/Dashboard/SmartFeaturesDashboard.php';
    128         if (file_exists($featureFile)) {
    129             require_once $featureFile;
    130             // The class will self-initialize as a singleton
    131         }
    132     }
    133 }
    134 
    135 /**
    136  * Check and initialize upgrade features
    137  */
    138 function walletup_check_upgrade_features() {
    139     // Load WalupPay teaser
    140     $walupPayFile = WALLET_UP_BASE_DIR . 'Core/Teasers/WalupPayTeaser.php';
    141     if (file_exists($walupPayFile)) {
    142         require_once $walupPayFile;
    143         // The class will self-initialize
    144     }
    145    
    146     // Load QR Customization teaser
    147     $qrCustomizationFile = WALLET_UP_BASE_DIR . 'Core/Teasers/QRCustomizationTeaser.php';
    148     if (file_exists($qrCustomizationFile)) {
    149         require_once $qrCustomizationFile;
    150         // The class will self-initialize
    151     }
    152 }
    153 
    154 // Redirect to settings page after activation
    155 if ( current_user_can( WALUP_ADMIN_CAP ) ) {
    156     add_action( 'activated_plugin', function ( $plugin ) {
    157         if ( $plugin == WALLET_UP_BASENAME ) {
    158             exit( wp_redirect( admin_url( 'admin.php?page=wallet-up', __FILE__ ) ) );
    159         }
    160     } );
    161 
    162     // Include settings link file
    163     include_once WALLET_UP_BASE_DIR . 'Core/dash/settings-link.php';
    164 }
    165 
    166 // Enqueue scripts and styles
    167 require_once WALLET_UP_BASE_DIR . 'Core/enqueue-walletup.php';
    168 
    169 // Add action hooks for settings page
    170 add_action('wallet_up_after_settings', 'walletup_add_upgrade_teaser_to_settings');
    171 add_action('wallet_up_after_payment_methods', 'walletup_add_payment_methods_teaser');
    172 add_action('wallet_up_after_shortcodes', 'walletup_add_shortcodes_teaser');
    173 
    174 /**
    175  * Add upgrade teaser to settings page
    176  */
    177 function walletup_add_upgrade_teaser_to_settings() {
    178     // Only show if we don't have the UpgradeLoader handling this
    179     if (!class_exists('WalletUp\\Core\\Teasers\\QRCustomizationTeaser')) {
    180         ?>
    181         <div class="wallet-up-upgrade-teaser">
    182             <div class="wallet-up-upgrade-teaser-content">
    183                 <h3>Upgrade to Wallet Up 4.1.0</h3>
    184                 <p>Get real-time analytics, WPForms integration, custom QR codes, and a modern admin interface.</p>
    185                 <p><a href="https://walletup.app/upgrade-to-4/" class="button button-primary" target="_blank">Learn More</a></p>
    186             </div>
    187         </div>
    188         <style>
    189             .wallet-up-upgrade-teaser {
    190                 margin: 20px 0;
    191                 padding: 15px;
    192                 background-color: #f4f4ff;
    193                 border-left: 4px solid #674fbf;
    194                 border-radius: 4px;
    195             }
    196            
    197             .wallet-up-upgrade-teaser h3 {
    198                 margin-top: 0;
    199                 color: #674fbf;
    200             }
    201            
    202             .wallet-up-upgrade-teaser .button-primary {
    203                 background-color: #674fbf;
    204                 border-color: #674fbf;
    205             }
    206            
    207             .wallet-up-upgrade-teaser .button-primary:hover {
    208                 background-color: #5840a3;
    209                 border-color: #5840a3;
    210             }
    211         </style>
    212         <?php
    213     }
    214 }
    215 
    216 /**
    217  * Add payment methods teaser
    218  */
    219 function walletup_add_payment_methods_teaser() {
    220     // Only show if we don't have the WalupPayTeaser handling this
    221     if (!class_exists('WalletUp\\Core\\Teasers\\WalupPayTeaser')) {
    222         ?>
    223         <div class="card-footer walup-pay-teaser">
    224             <h6 class="card-title">WalupPay <span class="new-badge">NEW</span></h6>
    225             <p>Our exclusive payment method with lower fees and faster processing. Available in Wallet Up 4.1.0.</p>
    226             <p><a href="https://walletup.app/waluppay/" target="_blank">Learn More</a></p>
    227         </div>
    228         <style>
    229             .walup-pay-teaser {
    230                 background-color: #f4f4ff;
    231                 border-left: 3px solid #674fbf;
    232                 position: relative;
    233             }
    234            
    235             .new-badge {
    236                 display: inline-block;
    237                 background: linear-gradient(135deg, #674fbf, #f59e0b);
    238                 color: white;
    239                 padding: 2px 5px;
    240                 border-radius: 10px;
    241                 font-size: 9px;
    242                 margin-left: 5px;
    243                 vertical-align: top;
    244                 font-weight: bold;
    245             }
    246         </style>
    247         <?php
    248     }
    249 }
    250 
    251 /**
    252  * Add shortcodes teaser
    253  */
    254 function walletup_add_shortcodes_teaser() {
    255     // Only show if we don't have the QRCustomizationTeaser handling this
    256     if (!class_exists('WalletUp\\Core\\Teasers\\QRCustomizationTeaser')) {
    257         ?>
    258         <div class="card-footer custom-qr-teaser">
    259             <h6 class="card-title">Custom QR Codes <span class="coming-soon-badge">Upgrade Now</span></h6>
    260             <p>Add your logo and brand colors to QR codes. Available in Wallet Up 4.1.0.</p>
    261             <p><a href="https://walletup.app/upgrade-to-4/" target="_blank">Learn More</a></p>
    262         </div>
    263         <style>
    264             .custom-qr-teaser {
    265                 background-color: #f4f4ff;
    266                 border-left: 3px solid #674fbf;
    267             }
    268            
    269             .coming-soon-badge {
    270                 display: inline-block;
    271                 background: linear-gradient(135deg, #674fbf, #f59e0b);
    272                 color: white;
    273                 padding: 2px 5px;
    274                 border-radius: 10px;
    275                 font-size: 9px;
    276                 margin-left: 5px;
    277                 vertical-align: top;
    278                 font-weight: bold;
    279             }
    280         </style>
    281         <?php
    282     }
    283 }
     137class PHPVersionChecker_Free {
     138    const MINIMUM_PHP_VERSION = '8.1.0';
     139    const LEGACY_DOWNLOAD_URL = 'https://walletup.app/legacy';
     140
     141    public static function is_compatible(): bool {
     142        return version_compare(PHP_VERSION, self::MINIMUM_PHP_VERSION, '>=');
     143    }
     144
     145    public static function deactivate_plugin(): void {
     146        if (function_exists('deactivate_plugins')) {
     147            deactivate_plugins(plugin_basename(__FILE__));
     148        }
     149    }
     150
     151    public static function show_incompatibility_notice(): void {
     152        $plugin_name = 'Wallet Up';
     153        $current_php_version = PHP_VERSION;
     154        $required_php_version = self::MINIMUM_PHP_VERSION;
     155        $legacy_url = self::LEGACY_DOWNLOAD_URL;
     156        $message = sprintf(
     157            __('<strong>%1$s Plugin Activation Prevented</strong><br/>' .
     158                'Your current PHP version (%2$s) is too low. This plugin requires PHP %3$s or higher.<br/>' .
     159                'Options:<br/>' .
     160                '- Upgrade your PHP version in your hosting control panel<br/>' .
     161                '- Use the <a href="%4$s" target="_blank">Legacy Version</a> compatible with your current setup', 'walletup'),
     162            esc_html($plugin_name),
     163            esc_html($current_php_version),
     164            esc_html($required_php_version),
     165            esc_url($legacy_url)
     166        );
     167        printf('<div class="notice notice-error is-dismissible"><p>%s</p></div>', wp_kses_post($message));
     168    }
     169
     170    public static function init(): void {
     171        if (!self::is_compatible()) {
     172            self::deactivate_plugin();
     173            add_action('admin_notices', [self::class, 'show_incompatibility_notice']);
     174        }
     175    }
     176}
     177
     178// Initialize PHP version compatibility checks
     179PHPVersionChecker_Free::init();
     180
     181// Only proceed with plugin initialization if PHP version is compatible
     182if (PHPVersionChecker_Free::is_compatible()) {
     183    // Define constants with FREE suffix to avoid conflicts
     184    define('WALLET_UP_FREE_VERSION', '4.1.0');
     185    define('WALLET_UP_FREE_FILE', __FILE__);
     186    define('WALLET_UP_FREE_PATH', plugin_dir_path(__FILE__));
     187    define('WALLET_UP_FREE_URL', plugin_dir_url(__FILE__));
     188    define('WALLET_UP_FREE_BASE_DIR', plugin_dir_path(__FILE__));
     189    define('WALLET_UP_FREE_BASE_URL', plugin_dir_url(__FILE__));
     190    define('WALLET_UP_FREE_BASENAME', plugin_basename(__FILE__));
     191    define('WALLET_UP_FREE_BLOCKS_VERSION', '1.0.0');
     192    define('WALLET_UP_FREE_BLOCKS_MANIFEST', WALLET_UP_FREE_PATH . 'walup-react/dist/.vite/manifest.json');
     193    define('WALLET_UP_FREE_BLOCKS_URL', plugins_url('walup-react/dist/', WALLET_UP_FREE_FILE));
     194   
     195    // For backward compatibility, also define the original constants if they're not already defined
     196    if (!defined('WALLET_UP_VERSION'))         define('WALLET_UP_VERSION', WALLET_UP_FREE_VERSION);
     197    if (!defined('WALLET_UP_FILE'))            define('WALLET_UP_FILE', WALLET_UP_FREE_FILE);
     198    if (!defined('WALLET_UP_PATH'))            define('WALLET_UP_PATH', WALLET_UP_FREE_PATH);
     199    if (!defined('WALLET_UP_URL'))             define('WALLET_UP_URL', WALLET_UP_FREE_URL);
     200    if (!defined('WALLET_UP_BASE_DIR'))        define('WALLET_UP_BASE_DIR', WALLET_UP_FREE_BASE_DIR);
     201    if (!defined('WALLET_UP_BASE_URL'))        define('WALLET_UP_BASE_URL', WALLET_UP_FREE_BASE_URL);
     202    if (!defined('WALLET_UP_BASENAME'))        define('WALLET_UP_BASENAME', WALLET_UP_FREE_BASENAME);
     203    if (!defined('WALLET_UP_BLOCKS_VERSION'))  define('WALLET_UP_BLOCKS_VERSION', WALLET_UP_FREE_BLOCKS_VERSION);
     204    if (!defined('WALLET_UP_BLOCKS_MANIFEST')) define('WALLET_UP_BLOCKS_MANIFEST', WALLET_UP_FREE_BLOCKS_MANIFEST);
     205    if (!defined('WALLET_UP_BLOCKS_URL'))      define('WALLET_UP_BLOCKS_URL', WALLET_UP_FREE_BLOCKS_URL);
     206   
     207    if (!defined('WALLET_UP_USE_DATABASE')) {
     208        define('WALLET_UP_USE_DATABASE', true);
     209    }
     210    if (!defined('WALLET_UP_TEMPLATES_PATH')) {
     211        define('WALLET_UP_TEMPLATES_PATH', WALLET_UP_FREE_PATH . 'templates/');
     212    }
     213   
     214    // Load autoloader
     215    if (file_exists(WALLET_UP_FREE_PATH . 'vendor/autoload.php')) {
     216        require_once WALLET_UP_FREE_PATH . 'vendor/autoload.php';
     217    } else {
     218        error_log('WalletUp: Composer autoloader not found. Limited functionality may be available.');
     219        add_action('admin_notices', function () {
     220            printf('<div class="notice notice-warning"><p>%s</p></div>', esc_html__('WalletUp: Composer autoloader is missing. Some features may not work correctly.', 'walletup'));
     221        });
     222    }
     223   
     224    // Initialize ActivationHandler early (before plugins_loaded)
     225    $activation_handler = \WalletUp\Core\Activation\ActivationHandler::getInstance();
     226   
     227    // Plugin initialization
     228    add_action('plugins_loaded', function () use ($activation_handler) {
     229        try {
     230            $plugin = \WalletUp\Plugin::getInstance();
     231            $GLOBALS['wallet_up'] = $plugin;
     232            if (defined('WP_DEBUG') && WP_DEBUG) {
     233                $redirect_time = get_transient('wallet_up_activation_redirect');
     234                if ($redirect_time) {
     235                    error_log('WalletUp Debug: Redirect time: ' . date('Y-m-d H:i:s', $redirect_time));
     236                }
     237            }
     238        } catch (\Exception $e) {
     239            error_log('WalletUp Initialization Error: ' . $e->getMessage());
     240            add_action('admin_notices', function () use ($e) {
     241                printf('<div class="notice notice-error"><p>%s</p></div>', esc_html__('WalletUp initialization failed: ', 'wallet-up') . esc_html($e->getMessage()));
     242            });
     243        }
     244    }, 5);
     245   
     246    // Add REST API initialization
     247    add_action('plugins_loaded', ['WalletUp\\API\\ClassManagerREST', 'init']);
     248   
     249    // Helper function to get asset path from manifest
     250    function walletup_get_asset_path_free(string $entry): string {
     251        $manifest_path = WALLET_UP_FREE_BASE_DIR . 'walup-react/dist/.vite/manifest.json';
     252        if (file_exists($manifest_path)) {
     253            $manifest = json_decode(file_get_contents($manifest_path), true);
     254            return isset($manifest[$entry]) ? $manifest[$entry]['file'] : $entry;
     255        }
     256        return $entry;
     257    }
     258   
     259    // For backward compatibility
     260    function walletup_get_asset_path(string $entry): string {
     261        return walletup_get_asset_path_free($entry);
     262    }
     263   
     264    // Include the compatibility handler
     265    require_once WALLET_UP_FREE_PATH . 'src/Compatibility/walletUpCompatibilityHandler.php';
     266   
     267    function handle_get_enabled_methods_free() {
     268        try {
     269            if (!check_ajax_referer('wallet_up_admin_nonce', 'nonce', false)) {
     270                throw new \Exception('Invalid security token');
     271            }
     272            $registry = \WalletUp\Core\PaymentRegistry::getInstance();
     273            $methods = [];
     274            foreach ($registry->getAllMethods() as $methodId => $method) {
     275                if ($registry->isMethodEnabled($methodId)) {
     276                    $methods[] = [
     277                        'id'          => $methodId,
     278                        'name'        => $method->getTitle(),
     279                        'description' => $method->getDescription(),
     280                        'icon'        => plugins_url("assets/images/{$methodId}-walup.png", WALLET_UP_FREE_FILE),
     281                    ];
     282                }
     283            }
     284            wp_send_json_success([
     285                'methods' => $methods,
     286            ]);
     287        } catch (\Exception $e) {
     288            wp_send_json_error([
     289                'message' => $e->getMessage(),
     290            ]);
     291        }
     292    }
     293   
     294    // Register the method
     295    add_action('wp_ajax_wallet_up_get_enabled_methods', 'WalletUp\\handle_get_enabled_methods_free');
     296    add_action('wp_ajax_nopriv_wallet_up_get_enabled_methods', 'WalletUp\\handle_get_enabled_methods_free');
     297}
Note: See TracChangeset for help on using the changeset viewer.