Plugin Directory

Changeset 2739480


Ignore:
Timestamp:
06/08/2022 08:49:14 PM (4 years ago)
Author:
mycholan
Message:

Silent update for valid session access checking issue.

Location:
wc-fields-factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wc-fields-factory/tags/4.0.1/includes/wcff_order_handler.php

    r2739039 r2739480  
    5454        if (isset($this->item_obj["product_id"])) {
    5555           
    56             /* Get the last used template from session */
    57             $template = WC()->session->get("wcff_current_template", "single-product");
     56            $template = "single-product";
     57            if (WC()->session) {
     58                /* Get the last used template from session */
     59                $template = WC()->session->get("wcff_current_template", "single-product");
     60            }
    5861           
    5962            $this->product_field_groups = wcff()->dao->load_fields_groups_for_product($this->item_obj['product_id'], 'wccpf', $template, "any");
  • wc-fields-factory/trunk/includes/wcff_order_handler.php

    r2739039 r2739480  
    5454        if (isset($this->item_obj["product_id"])) {
    5555           
    56             /* Get the last used template from session */
    57             $template = WC()->session->get("wcff_current_template", "single-product");
     56            $template = "single-product";
     57            if (WC()->session) {
     58                /* Get the last used template from session */
     59                $template = WC()->session->get("wcff_current_template", "single-product");
     60            }
    5861           
    5962            $this->product_field_groups = wcff()->dao->load_fields_groups_for_product($this->item_obj['product_id'], 'wccpf', $template, "any");
Note: See TracChangeset for help on using the changeset viewer.