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() SetUpAdditionalPaymentTypes::on activate wcpay WC 5.0.0
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();
}