Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions
DefaultPaymentGateways::get_rules_for_selling_venues()
Get rules that match the store's selling venues.
Метод класса: DefaultPaymentGateways{}
Хуков нет.
Возвращает
Объект
. Rules to match.
Использование
$result = DefaultPaymentGateways::get_rules_for_selling_venues( $selling_venues );
- $selling_venues(массив) (обязательный)
- Array of venues to match.
Код DefaultPaymentGateways::get_rules_for_selling_venues() DefaultPaymentGateways::get rules for selling venues WC 9.4.2
public static function get_rules_for_selling_venues( $selling_venues ) { $rules = array(); foreach ( $selling_venues as $venue ) { $rules[] = (object) array( 'type' => 'option', 'transformers' => array( (object) array( 'use' => 'dot_notation', 'arguments' => (object) array( 'path' => 'selling_venues', ), ), ), 'option_name' => 'woocommerce_onboarding_profile', 'operation' => '=', 'value' => $venue, 'default' => array(), ); } return (object) array( 'type' => 'or', 'operands' => $rules, ); }