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.
Метод класса: CostOfGoodsSoldController{}
Хуков нет.
Возвращает
true|false. True if the column exists, false otherwise.
Использование
$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 WC 10.7.0
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'
)
);
}