WordPress at Your Fingertips
function is not described

WC_Shipping_Flat_Rate::__construct() public WC 1.0

Constructor.

{} It's a method of the class: WC_Shipping_Flat_Rate{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Shipping_Flat_Rate = new WC_Shipping_Flat_Rate();
$WC_Shipping_Flat_Rate->__construct( $instance_id );
$instance_id(int)
Shipping method instance ID.

Code of WC_Shipping_Flat_Rate::__construct() WC 5.9.0

public function __construct( $instance_id = 0 ) {
	$this->id                 = 'flat_rate';
	$this->instance_id        = absint( $instance_id );
	$this->method_title       = __( 'Flat rate', 'woocommerce' );
	$this->method_description = __( 'Lets you charge a fixed rate for shipping.', 'woocommerce' );
	$this->supports           = array(
		'shipping-zones',
		'instance-settings',
		'instance-settings-modal',
	);
	$this->init();

	add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
}