PluginProbe
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder / 3.1.4
Ultimate Store Kit – Store Builder Addons for Elementor, WooCommerce Store Builder, EDD Store Builder v3.1.4
3.1.4 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.0.7 3.0.5 3.0.4 3.0.3 3.0.2 trunk 1.5.0 1.5.1 1.5.2 1.6.1 1.6.2 1.6.3 1.6.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 All 93 releases
← All changes | modules/qr-code/widgets/qr-code.php +14 -9 2.0.03.1.4 View file →
@@ -52,8 +52,14 @@
52 52
53 53 // public function get_custom_help_url() {
54 54 // return 'https://youtu.be/3VkvuskVaNAM';
55 55 // }
56 + public function has_widget_inner_wrapper(): bool {
57 + return ! \Elementor\Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
58 + }
59 + protected function is_dynamic_content(): bool {
60 + return false;
61 + }
56 62 protected function register_controls() {
57 63 $this->start_controls_section(
58 64 'section_content_qrcode',
59 65 [
@@ -102,21 +108,21 @@
102 108
103 109 $this->add_control(
104 110 'qr_code_alignemnt',
105 111 [
106 - 'label' => __('Alignement', 'ultiamte-store-kit'),
112 + 'label' => __('Alignement', 'ultimate-store-kit'),
107 113 'type' => Controls_Manager::CHOOSE,
108 114 'options' => [
109 115 'left' => [
110 - 'title' => __('Left', 'ultiamte-store-kit'),
116 + 'title' => __('Left', 'ultimate-store-kit'),
111 117 'icon' => 'eicon-h-align-left',
112 118 ],
113 119 'center' => [
114 - 'title' => __('Center', 'ultiamte-store-kit'),
120 + 'title' => __('Center', 'ultimate-store-kit'),
115 121 'icon' => 'eicon-h-align-center',
116 122 ],
117 123 'right' => [
118 - 'title' => __('Right', 'ultiamte-store-kit'),
124 + 'title' => __('Right', 'ultimate-store-kit'),
119 125 'icon' => 'eicon-h-align-right',
120 126 ],
121 127 ],
122 128 'selectors' => [
@@ -130,14 +136,13 @@
130 136 }
131 137
132 138 protected function get_last_order_id() {
133 139 global $wpdb;
140 + // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Editor-preview helper; picks the newest product once per preview render.
134 141 $results = $wpdb->get_col(
135 - "
136 - SELECT MAX(ID) FROM {$wpdb->prefix}posts
137 - WHERE post_type LIKE 'product'
138 - AND post_status = 'publish'"
142 + "SELECT MAX(ID) FROM {$wpdb->posts} WHERE post_type = 'product' AND post_status = 'publish'"
139 143 );
144 + // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
140 145 return reset($results);
141 146 }
142 147
143 148 protected function render() {
@@ -151,7 +156,7 @@
151 156 }
152 157 $size = (!empty($settings['qr_code_dimesion_size']) ? $settings['qr_code_dimesion_size'] : 150);
153 158 $dimension = $size . 'x' . $size;
154 159 $image_src = sprintf('//api.qrserver.com/v1/create-qr-code/?size=%s&ecc=L&qzone=1&data=%s', $dimension, urlencode($product_url));
155 - printf('<div class="usk-qrcode"><img src="%1$s" alt="%2$s"></div>', esc_url($image_src), esc_html(get_the_title($product_id)));
160 + printf('<div class="usk-qrcode"><img src="%1$s" alt="%2$s"></div>', esc_url($image_src), esc_attr(get_the_title($product_id)));
156 161 }
157 162 }