WC_Gateway_Cheque::__construct
Constructor for the gateway.
Method of the class: WC_Gateway_Cheque{}
Hooks from the method
Returns
null. Nothing (null).
Usage
$WC_Gateway_Cheque = new WC_Gateway_Cheque(); $WC_Gateway_Cheque->__construct();
WC_Gateway_Cheque::__construct() WC Gateway Cheque:: construct code WC 10.5.0
public function __construct() {
$this->id = self::ID;
$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 );
}