Code Duplication    Length = 17-17 lines in 2 locations

includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php 1 location

@@ 47-63 (lines=17) @@
44
	/**
45
	 * init function.
46
	 */
47
	public function init() {
48
49
		// Load the settings.
50
		$this->init_form_fields();
51
		$this->init_settings();
52
53
		// Define user set variables
54
		$this->enabled		= $this->get_option( 'enabled' );
55
		$this->title 		= $this->get_option( 'title' );
56
		$this->min_amount 	= $this->get_option( 'min_amount', 0 );
57
		$this->availability = $this->get_option( 'availability' );
58
		$this->countries 	= $this->get_option( 'countries' );
59
		$this->requires		= $this->get_option( 'requires' );
60
61
		// Actions
62
		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
63
	}
64
65
	/**
66
	 * Initialise Gateway Settings Form Fields.

includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-delivery.php 1 location

@@ 41-57 (lines=17) @@
38
	/**
39
	 * init function.
40
	 */
41
	public function init() {
42
43
		// Load the settings.
44
		$this->init_form_fields();
45
		$this->init_settings();
46
47
		// Define user set variables
48
		$this->title        = $this->get_option( 'title' );
49
		$this->type         = $this->get_option( 'type' );
50
		$this->fee          = $this->get_option( 'fee' );
51
		$this->type         = $this->get_option( 'type' );
52
		$this->codes        = $this->get_option( 'codes' );
53
		$this->availability = $this->get_option( 'availability' );
54
		$this->countries    = $this->get_option( 'countries' );
55
56
		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
57
	}
58
59
	/**
60
	 * calculate_shipping function.