PluginProbe
Commerce7 for WordPress / trunk
Commerce7 for WordPress vtrunk
1.8.1 1.8.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.3 1.2.0 1.2.1 1.2.2 1.2.3 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.3.4 1.3.5 1.4.0 1.4.1 All 37 releases
wp-commerce7 / includes / elementor / elementor-cart.php

elementor-cart.php in Commerce7 for WordPress trunk, at includes/elementor/elementor-cart.php

125 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elementor widget: Cart slide out and link
4 *
5 * Created Date: Wednesday September 2nd 2020
6 * Author: Michael Bourne
7 * -----
8 * Last Modified: Thursday, January 9th 2025, 1:51:24 pm
9 * Modified By: Michael Bourne
10 * -----
11 * Copyright (c) 2020 URSA6
12 *
13 * @package wp-commerce7
14 * @author Michael Bourne
15 * @license GPL3
16 * @link https://ursa6.com
17 * @since 1.0.8
18 */
19
20 if ( ! defined( 'ABSPATH' ) ) {
21 return;
22 }
23
24 /**
25 * Widget class
26 */
27 class C7WP_Elementor_Cart extends \Elementor\Widget_Base {
28
29
30 /**
31 * Get widget name.
32 *
33 * Retrieve Commerce7 widget name.
34 *
35 * @since 1.0.0
36 * @access public
37 *
38 * @return string Widget name.
39 */
40 public function get_name() {
41 return 'commerce7-cart';
42 }
43
44 /**
45 * Get widget title.
46 *
47 * Retrieve Commerce7 widget title.
48 *
49 * @since 1.0.0
50 * @access public
51 *
52 * @return string Widget title.
53 */
54 public function get_title() {
55 return __( 'Cart Fly Out', 'wp-commerce7' );
56 }
57
58 /**
59 * Get widget icon.
60 *
61 * Retrieve Commerce7 widget icon.
62 *
63 * @since 1.0.0
64 * @access public
65 *
66 * @return string Widget icon.
67 */
68 public function get_icon() {
69 return 'c7icon-c7sm';
70 }
71
72 /**
73 * Get widget categories.
74 *
75 * Retrieve the list of categories the widget belongs to.
76 *
77 * @since 1.0.0
78 * @access public
79 *
80 * @return array Widget categories.
81 */
82 public function get_categories() {
83 return [ 'commerce7' ];
84 }
85
86 /**
87 * Retrieve widget keywords.
88 *
89 * @since 1.0.0
90 * @access public
91 *
92 * @return array Widget keywords.
93 */
94 public function get_keywords() {
95 return [ 'commerce7', 'cart' ];
96 }
97
98 /**
99 * Register widget controls.
100 *
101 * Adds different input fields to allow the user to change and customize the widget settings.
102 *
103 * @since 1.0.0
104 * @access protected
105 */
106 protected function register_controls() { } // phpcs:ignore
107
108 /**
109 * Render Commerce widget output on the frontend.
110 *
111 * Written in PHP and used to generate the final HTML.
112 *
113 * @since 1.0.0
114 * @access protected
115 */
116 protected function render() {
117
118 echo do_shortcode( '[c7wp type="cart"]' );
119
120 }
121
122 protected function content_template() {} //phpcs:ignore
123 public function render_plain_content( $instance = [] ) {}
124
125 }