WordPress at Your Fingertips
function is not described

WC_Admin_Notices::legacy_shipping_notice() public WC 1.0

Show a notice asking users to convert to shipping zones.

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Admin_Notices::legacy_shipping_notice();

Code of WC_Admin_Notices::legacy_shipping_notice() WC 5.9.0

public static function legacy_shipping_notice() {
	$maybe_load_legacy_methods = array( 'flat_rate', 'free_shipping', 'international_delivery', 'local_delivery', 'local_pickup' );
	$enabled                   = false;

	foreach ( $maybe_load_legacy_methods as $method ) {
		$options = get_option( 'woocommerce_' . $method . '_settings' );
		if ( $options && isset( $options['enabled'] ) && 'yes' === $options['enabled'] ) {
			$enabled = true;
		}
	}

	if ( $enabled ) {
		include dirname( __FILE__ ) . '/views/html-notice-legacy-shipping.php';
	} else {
		self::remove_notice( 'template_files' );
	}
}