Plugin Directory

Changeset 3087281


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

Update Plugin

Location:
swipe-for-gravity-forms/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • swipe-for-gravity-forms/trunk/README.md

    r2888184 r3087281  
    44Requires at least: 4.6
    55Tested up to: 6.0.1
    6 Stable tag: 1.0.5
     6Stable tag: 1.0.6
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    2626## Changelog
    2727
     281.0.6 - 2024-05-16
     29- Fix expired token
     30
    28311.0.5 - 2023-03-28
    2932- Add event for success and fail
  • swipe-for-gravity-forms/trunk/includes/class-swipego-gf.php

    r2875097 r3087281  
    66    // Load dependencies
    77    public function __construct() {
    8 
     8       
    99        // Libraries
    1010        require_once( SWIPEGO_GF_PATH . 'libraries/swipego/class-swipego.php' );
    1111
    12         // Functions
    13         require_once( SWIPEGO_GF_PATH . 'includes/functions.php' );
     12        if ( swipego_is_plugin_activated( 'gravityforms/gravityforms.php' ) ) {
    1413
    15         // Admin
    16         require_once( SWIPEGO_GF_PATH . 'admin/class-swipego-gf-admin.php' );
     14            // Functions
     15            require_once( SWIPEGO_GF_PATH . 'includes/functions.php' );
     16
     17            // Admin
     18            require_once( SWIPEGO_GF_PATH . 'admin/class-swipego-gf-admin.php' );
     19           
     20            // API
     21            require_once( SWIPEGO_GF_PATH . 'libraries/swipego/includes/abstracts/abstract-swipego-client.php' );
     22            require_once( SWIPEGO_GF_PATH . 'libraries/swipego/includes/class-swipego-api.php' );
     23            require_once( SWIPEGO_GF_PATH . 'includes/class-swipego-gf-api.php' );
    1724       
    18         // API
    19         require_once( SWIPEGO_GF_PATH . 'libraries/swipego/includes/abstracts/abstract-swipego-client.php' );
    20         require_once( SWIPEGO_GF_PATH . 'libraries/swipego/includes/class-swipego-api.php' );
    21         require_once( SWIPEGO_GF_PATH . 'includes/class-swipego-gf-api.php' );
    22 
    23         // Initialize payment gateway
    24         require_once( SWIPEGO_GF_PATH . 'includes/class-swipego-gf-init.php' );
     25            if ( swipego_get_integration() ) {
     26               
     27                // Initialize payment gateway
     28                require_once( SWIPEGO_GF_PATH . 'includes/class-swipego-gf-init.php' );
     29               
     30            }
     31           
     32            if ( swipego_is_logged_in() ) {
     33               
     34                // Settings
     35                require_once( SWIPEGO_GF_PATH . 'admin/class-swipego-gf-settings.php' );
     36               
     37            }
     38        }
    2539       
    26         if ( swipego_is_logged_in() && swipego_is_plugin_activated( 'gravityforms/gravityforms.php' ) ) {
    27             // Settings
    28             require_once( SWIPEGO_GF_PATH . 'admin/class-swipego-gf-settings.php' );
    29         }
    3040
    3141    }
  • swipe-for-gravity-forms/trunk/libraries/swipego/admin/class-swipego-admin.php

    r2757021 r3087281  
    230230            if ( isset( $data['token'] ) && !empty( $data['token'] ) ) {
    231231                swipego_update_access_token( $data['token'], $remember );
     232                swipego_update_integration($email);
    232233            } else {
    233234                throw new Exception( __( 'An error occured! Please try again.', 'swipego' ) );
     
    265266
    266267        swipego_delete_access_token();
     268        swipego_delete_integration();
    267269
    268270        wp_send_json_success();
  • swipe-for-gravity-forms/trunk/libraries/swipego/includes/functions.php

    r2753484 r3087281  
    3030}
    3131
     32// Get integration
     33function swipego_get_integration() {
     34    return get_transient( 'swipego_integration' );
     35}
     36
     37// Update integration
     38function swipego_update_integration($email) {
     39    return set_transient( 'swipego_integration', $email, 0 );
     40}
     41
     42// Delete integration
     43function swipego_delete_integration() {
     44    return delete_transient( 'swipego_integration' );
     45}
     46
     47// Check if the user is has integration into Swipe
     48function swipego_has_integration() {
     49    return swipego_get_integration() ? true : false;
     50}
     51
    3252// Check if the specified plugin is installed and activated
    3353function swipego_is_plugin_activated( $plugin_path ) {
  • swipe-for-gravity-forms/trunk/readme.txt

    r2888184 r3087281  
    44Requires at least: 4.6
    55Tested up to: 6.0.1
    6 Stable tag: 1.0.5
     6Stable tag: 1.0.6
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    9191
    9292== Changelog ==
    93 = 1.0.5 - 2023-03-28
     93
     94= 1.0.6 - 2024-05-16 =
     95- Fix expired token
     96
     97= 1.0.5 - 2023-03-28 =
    9498- Add event for success and fail
    9599
  • swipe-for-gravity-forms/trunk/swipego-gf.php

    r2888184 r3087281  
    33 * Plugin Name:       Swipe for Gravity Forms
    44 * Description:       Swipe payment integration for Gravity Forms.
    5  * Version:           1.0.5
     5 * Version:           1.0.6
    66 * Requires at least: 4.6
    77 * Requires PHP:      7.0
Note: See TracChangeset for help on using the changeset viewer.