Code Duplication    Length = 8-10 lines in 2 locations

includes/admin/settings/class-wc-settings-products.php 1 location

@@ 25-34 (lines=10) @@
22
	/**
23
	 * Constructor.
24
	 */
25
	public function __construct() {
26
27
		$this->id    = 'products';
28
		$this->label = __( 'Products', 'woocommerce' );
29
30
		add_filter( 'woocommerce_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
31
		add_action( 'woocommerce_settings_' . $this->id, array( $this, 'output' ) );
32
		add_action( 'woocommerce_settings_save_' . $this->id, array( $this, 'save' ) );
33
		add_action( 'woocommerce_sections_' . $this->id, array( $this, 'output_sections' ) );
34
	}
35
36
	/**
37
	 * Get sections.

includes/admin/settings/class-wc-settings-shipping.php 1 location

@@ 25-32 (lines=8) @@
22
	/**
23
	 * Constructor.
24
	 */
25
	public function __construct() {
26
		$this->id    = 'shipping';
27
		$this->label = __( 'Shipping', 'woocommerce' );
28
		add_filter( 'woocommerce_settings_tabs_array', array( $this, 'add_settings_page' ), 20 );
29
		add_action( 'woocommerce_sections_' . $this->id, array( $this, 'output_sections' ) );
30
		add_action( 'woocommerce_settings_' . $this->id, array( $this, 'output' ) );
31
		add_action( 'woocommerce_settings_save_' . $this->id, array( $this, 'save' ) );
32
	}
33
34
	/**
35
	 * Add this page to settings.