PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.7.4
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.7.4
2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 1.8.1 All 42 releases
sellkit / includes / elementor / modules / order-details / items / order-number.php

order-number.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 1.7.4, at includes/elementor/modules/order-details/items/order-number.php

114 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Add Order Details Order Number Items.
4 *
5 * @package JupiterX_Core\sellkit
6 * @since 1.1.0
7 */
8
9 namespace Sellkit\Elementor\Modules\Order_Details\Items;
10
11 defined( 'ABSPATH' ) || die();
12
13 use Elementor\Plugin as Elementor;
14
15 /**
16 * Order Number Item.
17 *
18 * Initializing the order number item by extending item base abstract class.
19 *
20 * @since 1.1.0
21 */
22 class Order_Number extends Item_Base {
23
24 /**
25 * Get Item class postfix.
26 *
27 * Retrieve the Item class postfix.
28 *
29 * @since 1.1.0
30 * @access public
31 *
32 * @return string Item class postfix.
33 */
34 public function get_class_name() {
35 return 'order';
36 }
37
38 /**
39 * Get Item type.
40 *
41 * Retrieve the Item type.
42 *
43 * @since 1.1.0
44 * @access public
45 *
46 * @return string Item type.
47 */
48 public function get_type() {
49 return 'order_number';
50 }
51
52 /**
53 * Add render attribute.
54 *
55 * Add render attributes for each Item based on the settings.
56 *
57 * @since 1.1.0
58 * @access public
59 */
60 public function add_field_render_attribute() {
61 $attributes = [
62 'class' => 'order-details-item-content',
63 'id' => 'order-details-' . $this->get_id(),
64 ];
65
66 $this->widget->add_render_attribute( 'order-details-item-' . $this->get_id(), $attributes );
67 }
68
69 /**
70 * Render content.
71 *
72 * Render the Item content.
73 *
74 * @since 1.1.0
75 * @access public
76 * @param object $order_data Order data.
77 */
78 public function render_content( $order_data ) {
79 ?>
80 <strong
81 <?php
82 echo $this->widget->get_render_attribute_string( 'order-details-item-' . $this->get_id() );
83 ?>
84 >
85 <?php
86 echo $order_data['id'];
87 ?>
88 </strong>
89 <?php
90 }
91
92 /**
93 * Render dummy content.
94 *
95 * Render the Item dummy content.
96 *
97 * @since 1.1.0
98 * @access public
99 */
100 public function render_dummy_content() {
101 ?>
102 <strong
103 <?php
104 echo $this->widget->get_render_attribute_string( 'order-details-item-' . $this->get_id() );
105 ?>
106 >
107 <?php
108 echo __( '1234... ( order number )', 'sellkit' )
109 ?>
110 </strong>
111 <?php
112 }
113 }
114