WC_Product_Data_Store_CPT::get_primary_key_for_lookup_table()protectedWC 3.6.0

Get primary key name for lookup table.

Method of the class: WC_Product_Data_Store_CPT{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_primary_key_for_lookup_table( $table );
$table(string) (required)
Lookup table name.

Changelog

Since 3.6.0 Introduced.

WC_Product_Data_Store_CPT::get_primary_key_for_lookup_table() code WC 8.7.0

protected function get_primary_key_for_lookup_table( $table ) {
	if ( 'wc_product_meta_lookup' === $table ) {
		return 'product_id';
	}
	return '';
}