WC_Gateway_Cheque::__construct()publicWC 1.0

Constructor for the gateway.

Метод класса: WC_Gateway_Cheque{}

Хуки из метода

Возвращает

null. Ничего (null).

Использование

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

Код WC_Gateway_Cheque::__construct() WC 8.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 );
}