Code Duplication    Length = 13-14 lines in 2 locations

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

@@ 54-66 (lines=13) @@
51
	/**
52
	 * Initialize free shipping.
53
	 */
54
	public function init() {
55
		// Load the settings.
56
		$this->init_form_fields();
57
		$this->init_settings();
58
59
		// Define user set variables.
60
		$this->title      = $this->get_option( 'title' );
61
		$this->min_amount = $this->get_option( 'min_amount', 0 );
62
		$this->requires   = $this->get_option( 'requires' );
63
64
		// Actions.
65
		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
66
	}
67
68
	/**
69
	 * Init form fields.

includes/shipping/local-pickup/class-wc-shipping-local-pickup.php 1 location

@@ 37-50 (lines=14) @@
34
	/**
35
	 * Initialize local pickup.
36
	 */
37
	public function init() {
38
39
		// Load the settings.
40
		$this->init_form_fields();
41
		$this->init_settings();
42
43
		// Define user set variables
44
		$this->title		     = $this->get_option( 'title' );
45
		$this->tax_status	     = $this->get_option( 'tax_status' );
46
		$this->cost	             = $this->get_option( 'cost' );
47
48
		// Actions
49
		add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
50
	}
51
52
	/**
53
	 * calculate_shipping function.