Plugin Directory

Changeset 3087282


Ignore:
Timestamp:
05/15/2024 04:30:20 PM (22 months ago)
Author:
teamswipe
Message:

Update Plugin

Location:
swipe-for-givewp/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • swipe-for-givewp/trunk/includes/admin/give-swipego-settings.php

    r2759658 r3087282  
    6161    {
    6262        $this->section_id = 'swipego';
    63         $this->section_label = __('swipeGo', 'give-swipego');
     63        $this->section_label = __('SwipeGo', 'give-swipego');
    6464        $this->swipego = new Swipego_GWP_API();
    6565
  • swipe-for-givewp/trunk/includes/class-swipego-gwp.php

    r2759658 r3087282  
    77    public function __construct()
    88    {
    9 
     9       
    1010        // Libraries
    1111        require_once(SWIPEGO_GWP_PATH . 'libraries/swipego/class-swipego.php');
    12 
    13         // Functions
    14         require_once(SWIPEGO_GWP_PATH . 'includes/functions.php');
    15 
    16         // Admin
    17         require_once(SWIPEGO_GWP_PATH . 'admin/class-swipego-gwp-admin.php');
    18 
    19         if (swipego_is_logged_in() && swipego_is_plugin_activated('give/give.php')) {
    20 
     12       
     13        if ( swipego_is_plugin_activated('give/give.php')) {
     14           
     15            // Functions
     16            require_once(SWIPEGO_GWP_PATH . 'includes/functions.php');
     17   
     18            // Admin
     19            require_once(SWIPEGO_GWP_PATH . 'admin/class-swipego-gwp-admin.php');
     20           
    2121            // API
    2222            require_once( SWIPEGO_GWP_PATH . 'libraries/swipego/includes/abstracts/abstract-swipego-client.php' );
    2323            require_once( SWIPEGO_GWP_PATH . 'libraries/swipego/includes/class-swipego-api.php' );
    2424            require_once( SWIPEGO_GWP_PATH . 'includes/class-swipego-gwp-api.php' );
    25 
    26             // Initialize payment gateway
    27             require_once( SWIPEGO_GWP_PATH . 'includes/class-swipego-gwp-init.php' );
     25       
     26            if ( swipego_get_integration() ) {
     27               
     28                // Initialize payment gateway
     29                require_once( SWIPEGO_GWP_PATH . 'includes/class-swipego-gwp-init.php' );
     30   
     31            }
     32           
    2833        }
     34       
    2935    }
    3036
  • swipe-for-givewp/trunk/libraries/swipego/admin/class-swipego-admin.php

    r2759658 r3087282  
    247247            if (isset($data['token']) && !empty($data['token'])) {
    248248                swipego_update_access_token($data['token'], $remember);
     249                swipego_update_integration($email);
    249250            } else {
    250251                throw new Exception(__('An error occured! Please try again.', 'swipego'));
     
    280281
    281282        swipego_delete_access_token();
     283        swipego_delete_integration();
    282284
    283285        wp_send_json_success();
  • swipe-for-givewp/trunk/libraries/swipego/includes/functions.php

    r2759658 r3087282  
    4545}
    4646
     47// Get integration
     48function swipego_get_integration() {
     49    return get_transient( 'swipego_integration' );
     50}
     51
     52// Update integration
     53function swipego_update_integration($email) {
     54    return set_transient( 'swipego_integration', $email, 0 );
     55}
     56
     57// Delete integration
     58function swipego_delete_integration() {
     59    return delete_transient( 'swipego_integration' );
     60}
     61
     62// Check if the user is has integration into Swipe
     63function swipego_has_integration() {
     64    return swipego_get_integration() ? true : false;
     65}
     66
    4767// Check if the specified plugin is installed and activated
    4868function swipego_is_plugin_activated($plugin_path)
  • swipe-for-givewp/trunk/readme.txt

    r2793441 r3087282  
    44Requires at least: 4.2
    55Tested up to: 6.0.1
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.1
    77License: GPLv2.1
    88License URI: https://opensource.org/licenses/LGPL-2.1
     
    9191== Changelog ==
    9292
     93= 1.0.1 - 2024-05-16 =
     94* Fix expired token
     95
    9396= 1.0.0 =
    9497* add from version 1.0.1 Open Stack.
  • swipe-for-givewp/trunk/swipego-gwp.php

    r2759658 r3087282  
    33 * Plugin Name:       Swipe for GiveWP
    44 * Description:       Swipe payment integration for GiveWP.
    5  * Version:           1.0.0
     5 * Version:           1.0.1
    66 * Requires at least: 4.6
    77 * Requires PHP:      7.0
Note: See TracChangeset for help on using the changeset viewer.