PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / trunk
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster vtrunk
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 / compatibility / wpml / modules / order-details.php

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

78 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sellkit\Compatibility\Wpml\Modules;
4
5 defined( 'ABSPATH' ) || die();
6
7 /**
8 * Class Order_Details
9 *
10 * This class handles the compatibility of the fields in Sellkit
11 * with WPML for translation within Elementor modules.
12 *
13 * @since 2.3.2
14 */
15 class Order_Details extends \WPML_Elementor_Module_With_Items {
16 /**
17 * Retrieves the field name that holds the items.
18 *
19 * @since 2.3.2
20 *
21 * @return string The name of the field that contains the items.
22 */
23 public function get_items_field() {
24 return 'fields';
25 }
26
27 /**
28 * Retrieves the fields that are translatable.
29 *
30 * @since 2.3.2
31 *
32 * @return array List of fields that support translations.
33 */
34 public function get_fields() {
35 return [
36 'label',
37 ];
38 }
39
40 /**
41 * Retrieves the translation title for each field.
42 *
43 * @since 2.3.2
44 *
45 * @param string $field The field name.
46 *
47 * @return string The title for the translation of the field.
48 */
49 protected function get_title( $field ) {
50 switch ( $field ) {
51 case 'label':
52 return esc_html__( 'Sellkit Order Details: Items Label', 'sellkit' );
53
54 default:
55 return '';
56 }
57 }
58
59 /**
60 * Retrieves the editor type for each field.
61 *
62 * @since 2.3.2
63 *
64 * @param string $field The field name.
65 *
66 * @return string The editor type for the translation.
67 */
68 protected function get_editor_type( $field ) {
69 switch ( $field ) {
70 case 'label':
71 return 'LINE';
72
73 default:
74 return '';
75 }
76 }
77 }
78