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

Automattic\WooCommerce\Admin\Notes

SetUpAdditionalPaymentTypes::on_activate_wcpay() public WC 1.0

Executes when the WooCommerce Payments plugin is activated. It does nothing if WooCommerce Payments plugin is not included in onboarding business extensions, otherwise it possibly adds the note if it isn't already in the database and if it matches any criteria (see get_note()).

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

Хуков нет.

Возвращает

Null. Ничего.

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

$result = SetUpAdditionalPaymentTypes::on_activate_wcpay();

Код SetUpAdditionalPaymentTypes::on_activate_wcpay() WC 5.0.0

<?php
public static function on_activate_wcpay() {
	$onboarding_profile = get_option( 'woocommerce_onboarding_profile', array() );
	if ( is_array( $onboarding_profile ) && array_key_exists( 'business_extensions', $onboarding_profile ) ) {
		if ( ! is_array( $onboarding_profile['business_extensions'] ) ||
			! in_array( 'woocommerce-payments', $onboarding_profile['business_extensions'], true )
		) {
			return;
		}
	}

	self::possibly_add_note();
}