WordPress at Your Fingertips
function is not described

WC_Admin_Notices::no_shipping_methods_notice() public WC 1.0

No shipping methods.

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Admin_Notices::no_shipping_methods_notice();

Code of WC_Admin_Notices::no_shipping_methods_notice() WC 5.9.0

public static function no_shipping_methods_notice() {
	if ( wc_shipping_enabled() && ( empty( $_GET['page'] ) || empty( $_GET['tab'] ) || 'wc-settings' !== $_GET['page'] || 'shipping' !== $_GET['tab'] ) ) { // WPCS: input var ok, CSRF ok.
		$product_count = wp_count_posts( 'product' );
		$method_count  = wc_get_shipping_method_count();

		if ( $product_count->publish > 0 && 0 === $method_count ) {
			include dirname( __FILE__ ) . '/views/html-notice-no-shipping-methods.php';
		}

		if ( $method_count > 0 ) {
			self::remove_notice( 'no_shipping_methods' );
		}
	}
}