Plugin Directory

Changeset 2947859


Ignore:
Timestamp:
08/04/2023 05:31:46 PM (3 years ago)
Author:
RogueWebDesign
Message:

php session updates and wallet page refresh

Location:
web3-access
Files:
117 added
6 edited

Legend:

Unmodified
Added
Removed
  • web3-access/trunk/includes/content-filter.php

    r2900896 r2947859  
    8989                        $metapress_access_token = sanitize_key($_GET['mpatok']);
    9090                        $access_token = $metapress_access_token_manager->access_token($product_id, $metapress_access_token);
     91
    9192                        if( ! empty($access_token) && $this->session_manager->is_valid_wallet($access_token->payment_owner) ) {
    9293                            if( isset($access_token->expires) && ($access_token->expires > $this->current_time ) ) {
  • web3-access/trunk/includes/metapress-sessions.php

    r2947453 r2947859  
    88    public function create_metapress_session() {
    99        if( $this->is_session_started() === FALSE ) {
    10             session_start();
     10            session_start([
     11                'read_and_close' => true,
     12            ]);
    1113        }
    1214    }
     
    4547
    4648    public function set_session_wallet( $wallet_address ) {
     49        if( $this->is_session_started() === FALSE ) {
     50            session_start();
     51        }
    4752        $_SESSION['metapress_wallet_address'] = sanitize_text_field($wallet_address);
     53        session_write_close();
    4854    }
    4955
  • web3-access/trunk/js/wallet.js

    r2947453 r2947859  
    2929        this.provider = await detectEthereumProvider();
    3030        this.provider.on('accountsChanged', (accounts) => {
     31            this.#address = false;
    3132            this.remove_token_param();
    32             this.#address = false;
    33             document.location.reload();
     33
    3434        });
    3535
    3636        this.provider.on('chainChanged', (chainId) => {
    3737            this.remove_token_param();
    38             document.location.reload();
    3938        });
    4039
     
    182181            metapress_url.searchParams.delete('mpatok');
    183182            window.location.href = metapress_url.href;
     183        } else {
     184            document.location.reload();
    184185        }
    185186    }
  • web3-access/trunk/readme.txt

    r2947453 r2947859  
    55Requires at least: 4.0
    66Tested up to: 6.2.2
    7 Stable Tag: 1.5.5
     7Stable Tag: 1.5.6
    88License: GPLv2 or later
    99
     
    5454== Changelog ==
    5555
     56= 1.5.6 =
     57
     58<ul>
     59<li>PHP session management updates</li>
     60<li>Wallet page refresh and token access updates.</li>
     61</ul>
     62
    5663= 1.5.5 =
    5764
  • web3-access/trunk/updates/automatic-updates.php

    r2947453 r2947859  
    3535    }
    3636
    37     update_option('wp_metapress_plugin_version', '1.5.5');
     37    update_option('wp_metapress_plugin_version', '1.5.6');
    3838}
  • web3-access/trunk/web3-access.php

    r2947453 r2947859  
    66Author:      Rogue Web Design
    77Author URI:  https://www.roguewebdesign.ca
    8 Version:     1.5.5
     8Version:     1.5.6
    99License:     GPL2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3636
    3737if( ! defined('INSTALLED_METAPRESS_PLUGIN_VERSION') ) {
    38     define('INSTALLED_METAPRESS_PLUGIN_VERSION', '1.5.5');
     38    define('INSTALLED_METAPRESS_PLUGIN_VERSION', '1.5.6');
    3939}
    4040
Note: See TracChangeset for help on using the changeset viewer.