Automattic\WooCommerce\Blocks\Payments\Integrations
CashOnDelivery::get_enable_for_virtual
Return enable_for_virtual option.
Method of the class: CashOnDelivery{}
No Hooks.
Returns
true|false
. True if store allows COD payment for orders containing only virtual products.
Usage
// private - for code of main (parent) class only $result = $this->get_enable_for_virtual();
CashOnDelivery::get_enable_for_virtual() CashOnDelivery::get enable for virtual code WC 9.9.4
private function get_enable_for_virtual() { return filter_var( $this->get_setting( 'enable_for_virtual', false ), FILTER_VALIDATE_BOOLEAN ); }