# shopbuilder/1.1.4/app/Elementor/Widgets/Checkout/ShippingMethod.php

ShopBuilder – WooCommerce Builder For Elementor, version 1.1.4. 76 lines.

- Page: https://pluginprobe.com/plugins/shopbuilder/1.1.4/code/app/Elementor/Widgets/Checkout/ShippingMethod.php
- Raw: https://pluginprobe.com/plugins/shopbuilder/1.1.4/raw/app/Elementor/Widgets/Checkout/ShippingMethod.php
- Modified: 2023-07-11T10:48:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shopbuilder/1.1.4/code/app/Elementor/Widgets/Checkout/ShippingMethod.php#L10-L20`.

```php
<?php
/**
 * Main ProductDescription class.
 *
 * @package RadiusTheme\SB
 */

namespace RadiusTheme\SB\Elementor\Widgets\Checkout;

use RadiusTheme\SB\Helpers\Fns;
use RadiusTheme\SB\Abstracts\ElementorWidgetBase;
use RadiusTheme\SB\Elementor\Widgets\Controls\ShippingMethodSettings;

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'This script cannot be accessed directly.' );
}

/**
 * Product Description class
 */
class ShippingMethod extends ElementorWidgetBase {
	/**
	 * Construct function
	 *
	 * @param array $data default array.
	 * @param mixed $args default arg.
	 */
	public function __construct( $data = [], $args = null ) {
		$this->rtsb_name = esc_html__( 'Shipping Method', 'shopbuilder' );
		$this->rtsb_base = 'rtsb-shipping-method';
        $this->pro_tab       = 'style';
		parent::__construct( $data, $args );
	}
	/**
	 * Widget Field
	 *
	 * @return array
	 */
	public function widget_fields() {
		$fields = ShippingMethodSettings::widget_fields( $this );
		return apply_filters( 'rtsb/elements/elementor/checkout/' . $this->rtsb_base, $fields, $this );
	}
	/**
	 * Set Widget Keyword.
	 *
	 * @return array
	 */
	public function get_keywords() {
		return [ 'Shipping', 'Method' ] + parent::get_keywords();
	}

	/**
	 * Render Function
	 *
	 * @return void
	 */
	protected function render() {
		$controllers = $this->get_settings_for_display();
        $this->theme_support();
		$data = [
			'template'    => 'elementor/checkout/shipping-method',
			'controllers' => $controllers,
		];

		if ( $this->is_builder_mode() ) {
			 wc_load_cart();
		}

		Fns::load_template( $data['template'], $data );
        $this->theme_support( 'render_reset' );

	}

}

```
