WordPress at Your Fingertips
function is not described

WC_Admin_Addons::install_woocommerce_services_addon() public WC 1.0

Install WooCommerce Services from Extensions screens.

{} It's a method of the class: WC_Admin_Addons{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Admin_Addons::install_woocommerce_services_addon();

Code of WC_Admin_Addons::install_woocommerce_services_addon() WC 5.9.0

public static function install_woocommerce_services_addon() {
	check_admin_referer( 'install-addon_woocommerce-services' );

	$services_plugin_id = 'woocommerce-services';
	$services_plugin    = array(
		'name'      => __( 'WooCommerce Services', 'woocommerce' ),
		'repo-slug' => 'woocommerce-services',
	);

	WC_Install::background_installer( $services_plugin_id, $services_plugin );

	wp_safe_redirect( remove_query_arg( array( 'install-addon', '_wpnonce' ) ) );
	exit;
}