PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.6.9
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.6.9
4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / widgets / init / route.php
shopengine / widgets / init Last commit date
assets 1 year ago enqueue-scripts.php 2 years ago route.php 2 years ago
route.php
91 lines
1 <?php
2
3 namespace ShopEngine\Widgets\Init;
4
5 use ShopEngine\Base\Api;
6 defined('ABSPATH') || exit;
7 class Route extends Api
8 {
9
10 public function config() {
11
12 $this->prefix = 'widgets_partials';
13 $this->param = "";
14 }
15
16 public function get_filter_cat_products() {
17
18 $data = $this->request->get_params();
19
20 $products = $data['products'];
21 $settings = isset($data['settings']) ? $data['settings'] : null;
22
23 if(empty($products)) {
24
25 echo "<p class='error'>" . esc_html__('No products were found.', 'shopengine') . "</p>";
26
27 exit();
28 }
29
30 $args = array(
31 'post_type' => 'product',
32 'post__in' => $products,
33 'posts_per_page' => 50
34 );
35
36
37 $query = new \WP_Query($args);
38
39 if($query->have_posts()) :
40 while($query->have_posts()) : $query->the_post();
41
42 $default_content = [
43 'image' => 0,
44 'category' => 0,
45 'title' => 0,
46 'rating' => 0,
47 'price' => 0,
48 'description' => 0,
49 'buttons' => 0,
50 ];
51
52
53
54 $content = (!empty($view) ? $view : $default_content);
55 asort($content, SORT_NUMERIC);
56
57 if( $settings['shopengine_is_cats'] != 'yes' ) unset($content['category']);
58 if( $settings['shopengine_is_details'] != 'yes' ) {
59 unset($content['description']);
60 }
61 if( $settings['shopengine_is_product_rating'] != 'yes' ) unset($content['rating']);
62
63
64 ?> <div class='shopengine-single-product-item'> <?php
65 foreach($content as $key => $value) {
66 $function = '_product_' . $key;
67 \ShopEngine\Utils\Helper::$function($settings);
68 }
69 ?> </div> <?php
70
71 endwhile;
72 endif;
73
74 wp_reset_postdata();
75
76 exit();
77 }
78
79 public function post_checkout_login() {
80 $data = $this->request->get_params();
81 if(isset($data['rememberme'])) {
82 $data['rememberme'] = $data['rememberme'] == 'true' ? true : false;
83 }
84 $user = wp_signon($data);
85 if(is_wp_error($user)) {
86 return new \WP_Error('failed_login', $user->get_error_message(), ['status' => 404]);
87 }
88 return true;
89 }
90 }
91