Automattic\WooCommerce\Internal\OrderWithdrawal\Emails

OrderWithdrawalEmailDataFormatter::get_withdrawal_type_label │ public │ WC 1.0

Get the label for a withdrawal type value.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$OrderWithdrawalEmailDataFormatter = new OrderWithdrawalEmailDataFormatter();
$OrderWithdrawalEmailDataFormatter->get_withdrawal_type_label( $withdrawal_type ): string;
$withdrawal_type(строка) (обязательный)
Withdrawal type value.

Код OrderWithdrawalEmailDataFormatter::get_withdrawal_type_label() WC 11.2.2

public function get_withdrawal_type_label( string $withdrawal_type ): string {
	$options = array(
		OrderWithdrawalFormProcessor::WITHDRAWAL_TYPE_FULL     => __( 'The full order', 'woocommerce' ),
		OrderWithdrawalFormProcessor::WITHDRAWAL_TYPE_SPECIFIC => __( 'Specific items only', 'woocommerce' ),
	);

	return $options[ $withdrawal_type ] ?? '';
}