Plugin Directory

Changeset 2614673


Ignore:
Timestamp:
10/15/2021 10:47:14 AM (4 years ago)
Author:
sizeme
Message:

Cookie handling fix

Location:
sizeme-for-woocommerce
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • sizeme-for-woocommerce/tags/2.2.2/readme.txt

    r2303732 r2614673  
    33Tags: sizeme, measurements, sizeguide, size guide, size recommendations
    44Requires at least: 3.8
    5 Tested up to: 5.4.1
    6 Stable tag: 2.2.1
     5Tested up to: 5.8.1
     6Stable tag: 2.2.2
    77Requires PHP: 5.2.4
    88WC requires at least: 2.5
    9 WC tested up to: 4.1.0
     9WC tested up to: 5.8.0
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8383
    8484== Changelog ==
     85= 2.2.2 =
     86* Improved cookie handling again
     87
    8588= 2.2.1 =
    8689* Cookie handling improved
  • sizeme-for-woocommerce/tags/2.2.2/sizeme-for-woocommerce.php

    r2303732 r2614673  
    1010 * Plugin Name: SizeMe for WooCommerce
    1111 * Description: SizeMe is a web store plugin that enables your consumers to input their measurements and get personalised fit recommendations based on actual product data.
    12  * Version:     2.2.1
     12 * Version:     2.2.2
    1313 * Author:      SizeMe Ltd
    1414 * Author URI:  https://www.sizeme.com/
     
    1717 *
    1818 * WC requires at least: 2.5
    19  * WC tested up to: 4.1.0
     19 * WC tested up to: 5.8.0
    2020 *
    2121 * SizeMe for WooCommerce is free software: you can redistribute it and/or modify
     
    5454     * @var string VERSION The plugin version.
    5555     */
    56     const VERSION = '2.2.1';
     56    const VERSION = '2.2.2';
    5757
    5858    /**
     
    338338                $this->clear_sm_cookie( self::COOKIE_ACTION );
    339339            }
    340         } else {
    341             $this->clear_sm_cookie( self::COOKIE_ACTION );
    342340        }
    343341    }
     
    386384            $val = md5(rand().microtime());
    387385            $_COOKIE[ self::COOKIE_SESSION ] = $val;
    388             setcookie( self::COOKIE_SESSION , $val, strtotime( '+30 days' ), '/' );
     386            if ( !headers_sent() ) setcookie( self::COOKIE_SESSION , $val, strtotime( '+30 days' ), '/' );
    389387        } else {
    390388            $val = $_COOKIE[ self::COOKIE_SESSION ];
     
    415413    public function clear_sm_cookie($cookie_name) {
    416414        unset( $_COOKIE[ $cookie_name ] );
    417         setcookie( $cookie_name , '', time() - 3600 , '/' );
     415        if ( !headers_sent() ) setcookie( $cookie_name , '', time() - 3600 , '/' );
    418416        return;
    419417    }
  • sizeme-for-woocommerce/trunk/readme.txt

    r2303732 r2614673  
    33Tags: sizeme, measurements, sizeguide, size guide, size recommendations
    44Requires at least: 3.8
    5 Tested up to: 5.4.1
    6 Stable tag: 2.2.1
     5Tested up to: 5.8.1
     6Stable tag: 2.2.2
    77Requires PHP: 5.2.4
    88WC requires at least: 2.5
    9 WC tested up to: 4.1.0
     9WC tested up to: 5.8.0
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8383
    8484== Changelog ==
     85= 2.2.2 =
     86* Improved cookie handling again
     87
    8588= 2.2.1 =
    8689* Cookie handling improved
  • sizeme-for-woocommerce/trunk/sizeme-for-woocommerce.php

    r2303732 r2614673  
    1010 * Plugin Name: SizeMe for WooCommerce
    1111 * Description: SizeMe is a web store plugin that enables your consumers to input their measurements and get personalised fit recommendations based on actual product data.
    12  * Version:     2.2.1
     12 * Version:     2.2.2
    1313 * Author:      SizeMe Ltd
    1414 * Author URI:  https://www.sizeme.com/
     
    1717 *
    1818 * WC requires at least: 2.5
    19  * WC tested up to: 4.1.0
     19 * WC tested up to: 5.8.0
    2020 *
    2121 * SizeMe for WooCommerce is free software: you can redistribute it and/or modify
     
    5454     * @var string VERSION The plugin version.
    5555     */
    56     const VERSION = '2.2.1';
     56    const VERSION = '2.2.2';
    5757
    5858    /**
     
    338338                $this->clear_sm_cookie( self::COOKIE_ACTION );
    339339            }
    340         } else {
    341             $this->clear_sm_cookie( self::COOKIE_ACTION );
    342340        }
    343341    }
     
    386384            $val = md5(rand().microtime());
    387385            $_COOKIE[ self::COOKIE_SESSION ] = $val;
    388             setcookie( self::COOKIE_SESSION , $val, strtotime( '+30 days' ), '/' );
     386            if ( !headers_sent() ) setcookie( self::COOKIE_SESSION , $val, strtotime( '+30 days' ), '/' );
    389387        } else {
    390388            $val = $_COOKIE[ self::COOKIE_SESSION ];
     
    415413    public function clear_sm_cookie($cookie_name) {
    416414        unset( $_COOKIE[ $cookie_name ] );
    417         setcookie( $cookie_name , '', time() - 3600 , '/' );
     415        if ( !headers_sent() ) setcookie( $cookie_name , '', time() - 3600 , '/' );
    418416        return;
    419417    }
Note: See TracChangeset for help on using the changeset viewer.