Automattic\WooCommerce\Blocks\Payments\Integrations
CashOnDelivery::get_enable_for_methods
Return enable_for_methods option.
Метод класса: CashOnDelivery{}
Хуков нет.
Возвращает
Массив. Array of shipping methods (string ids) that allow COD. (If empty, all support COD.)
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_enable_for_methods();
Код CashOnDelivery::get_enable_for_methods() CashOnDelivery::get enable for methods WC 10.4.3
private function get_enable_for_methods() {
$enable_for_methods = $this->get_setting( 'enable_for_methods', [] );
if ( '' === $enable_for_methods ) {
return [];
}
return $enable_for_methods;
}