Plugin Directory

Changeset 2709643


Ignore:
Timestamp:
04/14/2022 08:53:02 AM (4 years ago)
Author:
nappssolutions
Message:

tagging version 1.0.5

Location:
napps
Files:
54 added
3 edited

Legend:

Unmodified
Added
Removed
  • napps/trunk/includes/class-core.php

    r2703352 r2709643  
    4646            }
    4747           
     48            // If order is not from auth user
    4849            $order = wc_get_order($orderID);
    49 
    50             // If order is not from auth user
    5150            if(!$order || $customer != $order->get_customer_id()) {
    5251                wp_redirect(home_url('/napps/order/failed'));
     
    5655
    5756            // Auth current customer based on his jwt token
    58             wp_clear_auth_cookie();
    59             wp_set_current_user( $customer );
    60             wp_set_auth_cookie($customer, true, is_ssl());
     57            try {
     58                wp_clear_auth_cookie();
     59                wp_set_current_user( $customer );
     60               
     61                $expiration = time() + apply_filters( 'auth_cookie_expiration', 2 * DAY_IN_SECONDS, $customer, false );
     62                $authCookie = wp_generate_auth_cookie($customer, $expiration, 'logged_in');
     63                setcookie( LOGGED_IN_COOKIE, $authCookie, 0, COOKIEPATH, COOKIE_DOMAIN, true, true );
     64               
     65            } catch(Exception $e) {
     66                wp_redirect(home_url('/napps/order/failed'));
     67                exit;
     68            }
    6169
    6270            // If we failed to set cookie for napps_mobile ignore
  • napps/trunk/napps.php

    r2703352 r2709643  
    33 * Plugin Name: NAPPS
    44 * Description: Plugin to complement the napps E-commerce solution. More on https://napps.pt
    5  * Version:     1.0.4
     5 * Version:     1.0.5
    66 * Author:      NAPPS
    77 * Author URI:  https://napps.pt
     
    3636define( 'NAPPS_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) );
    3737define( 'NAPPS_PLUGIN_FILE',  __FILE__ );
    38 define( 'NAPPS_VERSION', '1.0.4' );
     38define( 'NAPPS_VERSION', '1.0.5' );
    3939define( 'NAPPS_REST_PREFIX', 'napps/v1' );
    4040
  • napps/trunk/readme.txt

    r2703352 r2709643  
    55Requires at least: 4.7
    66Tested up to: 5.8
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88Requires PHP: 5.6
    99License: GPLv2
     
    7777== Changelog ==
    7878
     79= 1.0.5 =
     80
     81* Fix - Order payment auth cookie
     82
    7983= 1.0.4 =
    8084
Note: See TracChangeset for help on using the changeset viewer.