Automattic\WooCommerce\Internal\Admin\Settings\PaymentProviders

PaymentGateway::get_description()publicWC 1.0

Get the provider description of the payment gateway.

This is the intended gateway description to use throughout the WC admin. It should be short and to the point.

Note: We don't allow HTML tags in the description. All HTML tags will be stripped, including their contents.

Метод класса: PaymentGateway{}

Хуков нет.

Возвращает

Строку. The provider description of the payment gateway.

Использование

$PaymentGateway = new PaymentGateway();
$PaymentGateway->get_description( $payment_gateway ): string;
$payment_gateway(WC_Payment_Gateway) (обязательный)
The payment gateway object.

Код PaymentGateway::get_description() WC 9.6.1

public function get_description( WC_Payment_Gateway $payment_gateway ): string {
	$description = wp_strip_all_tags( html_entity_decode( $payment_gateway->get_method_description() ), true );

	// Truncate the description.
	return Utils::truncate_with_words( $description, 130, '…' );
}