Skip to content

Commit

Permalink
PLUGINS-6871
Browse files Browse the repository at this point in the history
  • Loading branch information
meteor-ec committed Mar 26, 2024
1 parent b3bc2a4 commit a12eacd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion includes/shortcodes/class-ecwid-shortcode-productbrowser.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 3 additions & 1 deletion lib/ecwid_api_v3.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion templates/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
<div><?php echo esc_html( apply_filters( 'ecwid_get_new_store_ref_id', '' ) ); ?></div>
</div>
</div>
<h2>Options</h2>

<h2>Options</h2>
<div>
<?php foreach ( $all_options as $key => $option ) : ?>
<?php if ( strpos( $key, 'ecwid' ) !== false ) : ?>
Expand Down

0 comments on commit a12eacd

Please sign in to comment.