Automattic\WooCommerce\Internal\Admin\Onboarding
OnboardingJetpack::activate_and_install_jetpack_ahead_of_wcpay()
Ensure that Jetpack gets installed and activated ahead of WooCommerce Payments if both are being installed/activated at the same time.
See: https://github.com/Automattic/woocommerce-payments/issues/1663 See: https://github.com/Automattic/jetpack/issues/19624
Метод класса: OnboardingJetpack{}
Хуков нет.
Возвращает
Массив
.
Использование
$OnboardingJetpack = new OnboardingJetpack(); $OnboardingJetpack->activate_and_install_jetpack_ahead_of_wcpay( $plugins );
- $plugins(массив) (обязательный)
- A list of plugins to install or activate.
Код OnboardingJetpack::activate_and_install_jetpack_ahead_of_wcpay() OnboardingJetpack::activate and install jetpack ahead of wcpay WC 9.7.1
public function activate_and_install_jetpack_ahead_of_wcpay( $plugins ) { if ( in_array( 'jetpack', $plugins, true ) && in_array( 'woocommerce-payments', $plugins, true ) ) { array_unshift( $plugins, 'jetpack' ); $plugins = array_unique( $plugins ); } return $plugins; }