WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\Payments\Integrations

CashOnDelivery::get_enable_for_methods() private WC 1.0

Return enable_for_methods option.

{} It's a method of the class: CashOnDelivery{}

No Hooks.

Return

Array. Array of shipping methods (string ids) that allow COD. (If empty, all support COD.)

Usage

// private - for code of main (parent) class only
$result = $this->get_enable_for_methods();

Code of CashOnDelivery::get_enable_for_methods() WC 5.6.0

private function get_enable_for_methods() {
	$enable_for_methods = $this->get_setting( 'enable_for_methods', [] );
	if ( '' === $enable_for_methods ) {
		return [];
	}
	return $enable_for_methods;
}