Plugin Directory

Changeset 3087279


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

Update Plugin

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

Legend:

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

    r2756673 r3087279  
    44Requires at least: 4.6
    55Tested up to: 6.0.1
    6 Stable tag: 1.0.0
     6Stable tag: 1.0.2
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    9191## Changelog
    9292
     93= 1.0.2 - 2024-05-16 =
     94- Fix expired token
     95
    9396= 1.0.0 - 2022-04-11 =
    9497- Initial release of the plugin
  • swipe-for-woocommerce/trunk/includes/class-swipego-wc.php

    r2757019 r3087279  
    99        // Libraries
    1010        require_once( SWIPEGO_WC_PATH . 'libraries/swipego/class-swipego.php' );
    11 
    12         // Functions
    13         require_once( SWIPEGO_WC_PATH . 'includes/functions.php' );
    14 
    15         // Admin
    16         require_once( SWIPEGO_WC_PATH . 'admin/class-swipego-wc-admin.php' );
    17 
    18         if ( swipego_is_logged_in() && swipego_is_plugin_activated( 'woocommerce/woocommerce.php' ) ) {
     11       
     12        if ( swipego_is_plugin_activated( 'woocommerce/woocommerce.php' ) ) {
     13           
     14            // Functions
     15            require_once( SWIPEGO_WC_PATH . 'includes/functions.php' );
     16   
     17            // Admin
     18            require_once( SWIPEGO_WC_PATH . 'admin/class-swipego-wc-admin.php' );
    1919
    2020            // API
     
    2323            require_once( SWIPEGO_WC_PATH . 'includes/class-swipego-wc-api.php' );
    2424
    25             // Settings
    26             require_once( SWIPEGO_WC_PATH . 'admin/class-swipego-wc-settings.php' );
     25            if ( swipego_get_integration() ) {
     26               
     27                // Initialize payment gateway
     28                require_once( SWIPEGO_WC_PATH . 'includes/class-swipego-wc-init.php' );
     29               
     30            }
     31           
     32            if ( swipego_is_logged_in() ) {
     33               
     34                // Settings
     35                require_once( SWIPEGO_WC_PATH . 'admin/class-swipego-wc-settings.php' );
     36               
     37            }
     38        }
    2739
    28             // Initialize payment gateway
    29             require_once( SWIPEGO_WC_PATH . 'includes/class-swipego-wc-init.php' );
    30         }
     40       
    3141
    3242    }
  • swipe-for-woocommerce/trunk/libraries/swipego/admin/class-swipego-admin.php

    r2757019 r3087279  
    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-woocommerce/trunk/libraries/swipego/includes/functions.php

    r2724952 r3087279  
    2525}
    2626
     27// Get integration
     28function swipego_get_integration() {
     29    return get_transient( 'swipego_integration' );
     30}
     31
     32// Update integration
     33function swipego_update_integration($email) {
     34    return set_transient( 'swipego_integration', $email, 0 );
     35}
     36
     37// Delete integration
     38function swipego_delete_integration() {
     39    return delete_transient( 'swipego_integration' );
     40}
     41
     42// Check if the user is has integration into Swipe
     43function swipego_has_integration() {
     44    return swipego_get_integration() ? true : false;
     45}
     46
    2747// Check if the user is logged into Swipe
    2848function swipego_is_logged_in() {
  • swipe-for-woocommerce/trunk/readme.txt

    r2789045 r3087279  
    44Requires at least: 4.6
    55Tested up to: 6.0.1
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    9191== Changelog ==
    9292
     93= 1.0.2 - 2024-05-16 =
     94- Fix expired token
     95
    9396= 1.0.0 - 2022-04-11 =
    9497- Initial release of the plugin
  • swipe-for-woocommerce/trunk/swipego-wc.php

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