PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.1.2
ShopBuilder – WooCommerce Builder For Elementor v3.1.2
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Modules / CheckoutEditor / ShippingFields.php

ShippingFields.php in ShopBuilder – WooCommerce Builder For Elementor 3.1.2, at app/Modules/CheckoutEditor/ShippingFields.php

38 lines 819 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace RadiusTheme\SB\Modules\CheckoutEditor;
4
5 // Do not allow directly accessing this file.
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit( 'This script cannot be accessed directly.' );
8 }
9
10 use RadiusTheme\SB\Traits\SingletonTrait;
11
12 /**
13 * CheckoutEditorInit
14 */
15 class ShippingFields extends CheckoutEditorBase {
16 /**
17 * Singleton Trait.
18 */
19 use SingletonTrait;
20
21 /**
22 * Notifications hooks.
23 */
24 private function __construct() {
25 parent::__construct();
26 add_filter( 'woocommerce_shipping_fields', [ $this, 'shipping_fields_generator' ], 9999, 2 );
27 }
28
29 /**
30 * @param array $address_fields fields.
31 * @param array $country fields.
32 * @return array
33 */
34 public function shipping_fields_generator( $address_fields, $country ) {
35 return $this->render_fields( $this->shipping_settings, $address_fields );
36 }
37 }
38