WordPress at Your Fingertips
function is not described

WC_Gateway_Cheque::__construct() public WC 1.0

Constructor for the gateway.

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

Hooks from the method
Return

null. Nothing.

Usage

$WC_Gateway_Cheque = new WC_Gateway_Cheque();
$WC_Gateway_Cheque->__construct();

Code of WC_Gateway_Cheque::__construct() WC 5.7.0

public function __construct() {
	$this->id                 = 'cheque';
	$this->icon               = apply_filters( 'woocommerce_cheque_icon', '' );
	$this->has_fields         = false;
	$this->method_title       = _x( 'Check payments', 'Check payment method', 'woocommerce' );
	$this->method_description = __( 'Take payments in person via checks. This offline gateway can also be useful to test purchases.', 'woocommerce' );

	// Load the settings.
	$this->init_form_fields();
	$this->init_settings();

	// Define user set variables.
	$this->title        = $this->get_option( 'title' );
	$this->description  = $this->get_option( 'description' );
	$this->instructions = $this->get_option( 'instructions' );

	// Actions.
	add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
	add_action( 'woocommerce_thankyou_cheque', array( $this, 'thankyou_page' ) );

	// Customer Emails.
	add_action( 'woocommerce_email_before_order_table', array( $this, 'email_instructions' ), 10, 3 );
}