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

Automattic\WooCommerce\Admin\Features

OnboardingSetUpShipping::on_onboarding_profile_completed() public WC 1.0

Set up shipping.

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

Хуков нет.

Возвращает

Null. Ничего.

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

$result = OnboardingSetUpShipping::on_onboarding_profile_completed();

Код OnboardingSetUpShipping::on_onboarding_profile_completed() WC 4.7.0

<?php
public static function on_onboarding_profile_completed() {
	if ( ! self::has_physical_products() ) {
		return;
	}

	if ( self::has_existing_shipping_zones() ) {
		return;
	}

	$country_code = WC()->countries->get_base_country();

	// Corrolary to the logic in /client/task-list/tasks.js.
	// Skip for countries we don't recommend WCS for.
	if ( in_array( $country_code, array( 'AU', 'CA', 'GB' ), true ) ) {
		return;
	}

	if (
		! class_exists( '\Jetpack_Data' ) ||
		! class_exists( '\WC_Connect_Loader' ) ||
		! class_exists( '\WC_Connect_Options' )
	) {
		return;
	}

	$user_token        = \Jetpack_Data::get_access_token( JETPACK_MASTER_USER );
	$jetpack_connected = isset( $user_token->external_user_id );
	$wcs_version       = \WC_Connect_Loader::get_wcs_version();
	$wcs_tos_accepted  = \WC_Connect_Options::get_option( 'tos_accepted' );

	if ( ! $jetpack_connected || ! $wcs_version || ! $wcs_tos_accepted ) {
		return;
	}

	self::set_up_free_local_shipping();
	WC_Admin_Notes_Review_Shipping_Settings::possibly_add_note();
	wc_admin_record_tracks_event( 'shipping_automatically_set_up' );
}