diff --git a/includes/shortcodes/class-ecwid-shortcode-productbrowser.php b/includes/shortcodes/class-ecwid-shortcode-productbrowser.php index 97e5124e..0d0ecbb7 100644 --- a/includes/shortcodes/class-ecwid-shortcode-productbrowser.php +++ b/includes/shortcodes/class-ecwid-shortcode-productbrowser.php @@ -209,7 +209,9 @@ public function render_placeholder() { protected function _process_params( $shortcode_params = array() ) { - $shortcode_params = array_map( 'esc_attr', $shortcode_params ); + if ( ! empty( $shortcode_params ) && is_array( $shortcode_params ) ) { + $shortcode_params = array_map( 'esc_attr', $shortcode_params ); + } $atts = shortcode_atts( array( @@ -315,6 +317,8 @@ protected function _get_param_default_category_id( $shortcode_params ) { ? $shortcode_params['default_category_id'] : get_option( 'ecwid_default_category_id' ); + $ecwid_default_category_id = absint( $ecwid_default_category_id ); + return $ecwid_default_category_id; } diff --git a/lib/ecwid_api_v3.php b/lib/ecwid_api_v3.php index 7662bae4..674ec874 100644 --- a/lib/ecwid_api_v3.php +++ b/lib/ecwid_api_v3.php @@ -573,7 +573,9 @@ public function get_store_profile( $disable_cache = false ) { return false; } - $params = array(); + $params = array( + 'responseFields' => 'generalInfo,account,settings,payment(applePay),featureToggles,formatsAndUnits(currency,currencyPrefix,currencySuffix),designSettings', + ); $options = $this->build_request_headers(); $url = $this->build_request_url( $this->_profile_api_url, $params ); diff --git a/templates/debug.php b/templates/debug.php index 71a75157..0ca68f3c 100644 --- a/templates/debug.php +++ b/templates/debug.php @@ -83,8 +83,8 @@
-