WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Gateway_COD::__construct() public WC 1.0

Constructor for the gateway.

{} Это метод класса: WC_Gateway_COD{}

Хуков нет.

Возвращает

null. Ничего.

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

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

Код WC_Gateway_COD::__construct() WC 5.6.0

public function __construct() {
	// Setup general properties.
	$this->setup_properties();

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

	// Get settings.
	$this->title              = $this->get_option( 'title' );
	$this->description        = $this->get_option( 'description' );
	$this->instructions       = $this->get_option( 'instructions' );
	$this->enable_for_methods = $this->get_option( 'enable_for_methods', array() );
	$this->enable_for_virtual = $this->get_option( 'enable_for_virtual', 'yes' ) === 'yes';

	add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
	add_action( 'woocommerce_thankyou_' . $this->id, array( $this, 'thankyou_page' ) );
	add_filter( 'woocommerce_payment_complete_order_status', array( $this, 'change_payment_complete_order_status' ), 10, 3 );

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