PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.86
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.86
51.1.86 51.1.84 51.1.85 51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 All 40 releases
← All changes | includes/widgets/Wishlist_Button/Wishlist_Button.php +10 -5 51.1.63 → 51.1.86 View file →
@@ -59,9 +59,9 @@
59 59 * @return array<int, string> Categories.
60 60 */
61 61 public function get_categories(): array
62 62 {
63 - return ['king-addons', 'king-addons-woo-builder'];
63 + return ['king-addons-woo'];
64 64 }
65 65
66 66 /**
67 67 * Style dependencies.
@@ -166,9 +166,9 @@
166 166 'kng_icon_class',
167 167 [
168 168 'label' => esc_html__('Icon class', 'king-addons'),
169 169 'type' => Controls_Manager::TEXT,
170 - 'default' => Wishlist_Settings::get('icon_choice', 'eicon-heart'),
170 + 'default' => Wishlist_Settings::get('icon_choice', 'fas fa-heart'),
171 171 ]
172 172 );
173 173
174 174 $this->end_controls_section();
@@ -231,18 +231,23 @@
231 231 echo esc_html__('Select a product to show wishlist button.', 'king-addons');
232 232 return;
233 233 }
234 234
235 + if (function_exists('wc_get_product') && !wc_get_product($product_id)) {
236 + echo esc_html__('Select a product to show wishlist button.', 'king-addons');
237 + return;
238 + }
239 +
235 240 $service = new Wishlist_Service();
236 241 $renderer = new Wishlist_Renderer($service);
237 242
238 - echo $renderer->render_button([
243 + echo Wishlist_Renderer::kses($renderer->render_button([
239 244 'product_id' => $product_id,
240 245 'label_default' => $settings['kng_label_default'] ?? Wishlist_Settings::get('button_add_text'),
241 246 'label_added' => $settings['kng_label_added'] ?? Wishlist_Settings::get('button_added_text'),
242 247 'display_mode' => $settings['kng_display_mode'] ?? Wishlist_Settings::get('button_display_mode', 'icon_text'),
243 - 'icon_class' => $settings['kng_icon_class'] ?? Wishlist_Settings::get('icon_choice', 'eicon-heart'),
244 - ]);
248 + 'icon_class' => $settings['kng_icon_class'] ?? Wishlist_Settings::get('icon_choice', 'fas fa-heart'),
249 + ]));
245 250 }
246 251 }
247 252
248 253