Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Gateway_COD::get_matching_rates( array $rate_ids )
Indicates whether a rate exists in an array of canonically-formatted rate IDs that activates this gateway.
Description Description
Parameters Parameters
- $rate_ids
-
(Required) Rate ids to check.
Return Return
(boolean)
Source Source
File: includes/gateways/cod/class-wc-gateway-cod.php
private function get_matching_rates( $rate_ids ) { // First, match entries in 'method_id:instance_id' format. Then, match entries in 'method_id' format by stripping off the instance ID from the candidates. return array_unique( array_merge( array_intersect( $this->enable_for_methods, $rate_ids ), array_intersect( $this->enable_for_methods, array_unique( array_map( 'wc_get_string_before_colon', $rate_ids ) ) ) ) ); }
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |