Automattic\WooCommerce\Internal\Orders
OrderActionsRestController::get_template_id_enum
Get the list of possible template ID values.
Note that this gets the IDs of all email templates. This does not mean all of these templates are available to send through the API endpoint.
Метод класса: OrderActionsRestController{}
Хуков нет.
Возвращает
Строку[]
.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_template_id_enum(): array;
Код OrderActionsRestController::get_template_id_enum() OrderActionsRestController::get template id enum WC 9.9.4
private function get_template_id_enum(): array { $enum = array(); if ( is_array( WC()->mailer()->emails ) ) { $enum = array_map( function ( $template ) { if ( ! $template instanceof WC_Email || empty( $template->id ) ) { return null; } return $template->id; }, WC()->mailer()->emails, array() // Strip off the associative array keys. ); } return array_filter( $enum ); }