WordPress at Your Fingertips
function is not described

WC_Shipping_Zone_Data_Store::get_method() public WC 3.0.0

Get a shipping zone method instance.

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

No Hooks.

Return

Object.

Usage

$WC_Shipping_Zone_Data_Store = new WC_Shipping_Zone_Data_Store();
$WC_Shipping_Zone_Data_Store->get_method( $instance_id );
$instance_id(int) (required)
Instance ID.

Changelog

Since 3.0.0 Introduced.

Code of WC_Shipping_Zone_Data_Store::get_method() WC 5.6.0

public function get_method( $instance_id ) {
	global $wpdb;
	return $wpdb->get_row( $wpdb->prepare( "SELECT zone_id, method_id, instance_id, method_order, is_enabled FROM {$wpdb->prefix}woocommerce_shipping_zone_methods WHERE instance_id = %d LIMIT 1;", $instance_id ) );
}