WC_Product_Data_Store_CPT::get_primary_key_for_lookup_table
Get primary key name for lookup table.
Method of the class: WC_Product_Data_Store_CPT{}
No Hooks.
Returns
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() WC Product Data Store CPT::get primary key for lookup table code WC 10.3.6
protected function get_primary_key_for_lookup_table( $table ) {
if ( 'wc_product_meta_lookup' === $table ) {
return 'product_id';
}
return '';
}