Automattic\WooCommerce\Internal\CostOfGoodsSold
CostOfGoodsSoldController::get_general_cost_edit_field_tooltip
Get the tooltip text for the COGS value field in the product editor.
Method of the class: CostOfGoodsSoldController{}
No Hooks.
Returns
String. The string to use as tooltip (translated but not escaped).
Usage
$CostOfGoodsSoldController = new CostOfGoodsSoldController(); $CostOfGoodsSoldController->get_general_cost_edit_field_tooltip( $for_variable_products );
- $for_variable_products(true|false) (required)
- True to get the value for variable products, false for other types of products.
CostOfGoodsSoldController::get_general_cost_edit_field_tooltip() CostOfGoodsSoldController::get general cost edit field tooltip code WC 10.3.3
public function get_general_cost_edit_field_tooltip( bool $for_variable_products ) {
return $for_variable_products ?
__( 'Add the amount it costs you to buy or make this product. This will be applied as the default value for variations.', 'woocommerce' ) :
__( 'Add the amount it costs you to buy or make this product.', 'woocommerce' );
}