PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.3.1
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.3.1
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 / module.php

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

60 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || die();
4
5 class Sellkit_Elementor_Order_Details_Module extends Sellkit_Elementor_Base_Module {
6
7 public static $field_types = [];
8
9 public function __construct() {
10 parent::__construct();
11
12 $this->register_field_types();
13
14 }
15
16 public static function is_active() {
17 return function_exists( 'WC' );
18 }
19
20 /**
21 * Register module widgets.
22 *
23 * @since 1.1.0
24 * @access public
25 *
26 * @return array
27 */
28 public function get_widgets() {
29 return [ 'order-details' ];
30 }
31
32 public static function get_field_types() {
33 return [
34 'order_number' => esc_html__( 'Order Number', 'sellkit' ),
35 'order_status' => esc_html__( 'Order Status', 'sellkit' ),
36 'payment_method' => esc_html__( 'Payment Method', 'sellkit' ),
37 'contact_details' => esc_html__( 'Contact Details', 'sellkit' ),
38 'shipping_method' => esc_html__( 'Shipping Method', 'sellkit' ),
39 'trachking_number' => esc_html__( 'Tracking Number', 'sellkit' ),
40 'shipping_address' => esc_html__( 'Shipping Address', 'sellkit' ),
41 'bank_transfer' => esc_html__( 'Bank Details', 'sellkit' ),
42 ];
43 }
44
45 public static function render_field( $widget, $field ) {
46 self::$field_types[ $field['type'] ]->render( $widget, $field );
47 }
48
49 /**
50 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
51 */
52 private function register_field_types() {
53 foreach ( self::get_field_types() as $field_key => $field_value ) {
54 $class_name = 'Sellkit\Elementor\Modules\Order_Details\Items\\' . $field_key;
55
56 self::$field_types[ $field_key ] = new $class_name();
57 }
58 }
59 }
60