WC_Shipping_Zone_Data_Store::get_zone_id_by_instance_id( int $id )

Return a zone ID from an instance ID.


Description Description


Parameters Parameters

$id

(Required) Instnace ID.


Top ↑

Return Return

(int)


Top ↑

Source Source

File: includes/data-stores/class-wc-shipping-zone-data-store.php

	public function get_zone_id_by_instance_id( $id ) {
		global $wpdb;
		return $wpdb->get_var( $wpdb->prepare( "SELECT zone_id FROM {$wpdb->prefix}woocommerce_shipping_zone_methods as methods WHERE methods.instance_id = %d LIMIT 1;", $id ) );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.