Automattic\WooCommerce\Internal\ProductCustoms
ClassicEditorFields::get_help_text
Appends the inherited parent value to a field's help text, when there is one.
Метод класса: ClassicEditorFields{}
Хуков нет.
Возвращает
string.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_help_text( $description, ?string $inherited ): string;
- $description(строка) (обязательный)
- Field help text.
- ?string $inherited(обязательный)
- .
Код ClassicEditorFields::get_help_text() ClassicEditorFields::get help text WC 11.3.0
private function get_help_text( string $description, ?string $inherited ): string {
if ( null === $inherited ) {
return $description;
}
/* translators: %s: Customs value inherited from the parent product. */
return $description . ' ' . sprintf( __( 'Leave blank to inherit from the product: %s.', 'woocommerce' ), $inherited );
}