From 4ea716c80c874833bd909ca7c56581b654807b35 Mon Sep 17 00:00:00 2001 From: Justin Sainton Date: Sat, 18 Feb 2017 20:00:59 -0800 Subject: [PATCH] Failed merge of 3.12.0, missed placement of product.js enqueue on single controller. --- wpsc-components/theme-engine-v2/mvc/controllers/single.php | 3 +-- wpsc-includes/purchase-log.class.php | 1 - wpsc-includes/wpsc-theme-engine-bootstrap.php | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wpsc-components/theme-engine-v2/mvc/controllers/single.php b/wpsc-components/theme-engine-v2/mvc/controllers/single.php index 87b90bfa61..48e155b556 100644 --- a/wpsc-components/theme-engine-v2/mvc/controllers/single.php +++ b/wpsc-components/theme-engine-v2/mvc/controllers/single.php @@ -9,7 +9,7 @@ public function __construct() { public function index() { $this->title = get_queried_object()->post_title; $this->view = 'single'; - + _wpsc_enqueue_product_scripts(); $this->load_lightbox(); } @@ -27,7 +27,6 @@ public function _fluidbox_styles() { public function _fluidbox_scripts() { wp_enqueue_script( 'wpsc-fluidbox' ); wp_localize_script( 'wpsc-fluidbox', 'WPSC_Fluid_Box_Options', apply_filters( 'wpsc_fluidbox_options', array() ) ); - _wpsc_enqueue_product_scripts(); } public function get_native_template() { diff --git a/wpsc-includes/purchase-log.class.php b/wpsc-includes/purchase-log.class.php index a2da29e163..e3809eccd5 100644 --- a/wpsc-includes/purchase-log.class.php +++ b/wpsc-includes/purchase-log.class.php @@ -1078,7 +1078,6 @@ public function save_meta() { wpsc_add_purchase_meta( $this->get( 'id' ), $key, $val ); } } - } else { wpsc_update_purchase_meta( $this->get( 'id' ), $key, $value ); } diff --git a/wpsc-includes/wpsc-theme-engine-bootstrap.php b/wpsc-includes/wpsc-theme-engine-bootstrap.php index 202e88497b..e8c8d8a086 100644 --- a/wpsc-includes/wpsc-theme-engine-bootstrap.php +++ b/wpsc-includes/wpsc-theme-engine-bootstrap.php @@ -215,6 +215,7 @@ function _wpsc_maybe_activate_theme_engine_v2() { update_option( 'wpsc_get_active_theme_engine', $new_theme_engine ); $location = isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : home_url(); + // Redirect ensures that both templates will not be loaded, fixing fatal errors, etc. wp_safe_redirect( esc_url_raw( $location ) ); exit;