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
Method of the class: OnboardingJetpack{}
No Hooks.
Return
Array
.
Usage
$OnboardingJetpack = new OnboardingJetpack(); $OnboardingJetpack->activate_and_install_jetpack_ahead_of_wcpay( $plugins );
- $plugins(array) (required)
- A list of plugins to install or activate.
OnboardingJetpack::activate_and_install_jetpack_ahead_of_wcpay() OnboardingJetpack::activate and install jetpack ahead of wcpay code WC 8.7.0
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; }