Automattic\WooCommerce\Internal\CostOfGoodsSold
CostOfGoodsSoldController::product_meta_lookup_table_cogs_value_columns_exist()
Tells if the COGS value column exists in the product meta lookup table.
Method of the class: CostOfGoodsSoldController{}
No Hooks.
Return
true|false
. True if the column exists, false otherwise.
Usage
$CostOfGoodsSoldController = new CostOfGoodsSoldController(); $CostOfGoodsSoldController->product_meta_lookup_table_cogs_value_columns_exist(): bool;
CostOfGoodsSoldController::product_meta_lookup_table_cogs_value_columns_exist() CostOfGoodsSoldController::product meta lookup table cogs value columns exist code WC 9.8.1
public function product_meta_lookup_table_cogs_value_columns_exist(): bool { global $wpdb; return (bool) $wpdb->get_var( $wpdb->prepare( "SHOW COLUMNS FROM {$wpdb->prefix}wc_product_meta_lookup LIKE %s", 'cogs_total_value' ) ); }