• jomo

    (@jonathanmoorebcsorg)


    Just noticed this is forcing a Session start on every init.. non-woocommerce pages, admin and front end, no checks….
    Couldn’t it be limited to do this only if the client is actually trying to upload a file? Or at least exit if not in the checkout / my-account area..

    	function __construct() {
    		if ( 'yes' === get_option( 'alg_wc_checkout_files_upload_enabled' ) ) {
    			add_action( 'add_meta_boxes', array( $this, 'add_file_admin_order_meta_box' ) );
    			add_action( 'init', array( $this, 'process_checkout_files_upload' ) );

    ….

    	function process_checkout_files_upload() {
            //if (! wc_iss)
    		if ( ! session_id() ) {
    			session_start();
    		}
  • The topic ‘Forces session start on every init ??’ is closed to new replies.