You are here

function payment_rules_condition_payment_method_comparison in Payment 7

Implements Rules condition callback: check whether a payment method is one of the given payment methods.

Parameters

PaymentMethod $payment_method: The payment method to check the condition for.

array $pmids: An array with payment method IDs.

Return value

boolean

1 call to payment_rules_condition_payment_method_comparison()
payment_rules_condition_payment_uses_payment_method in ./payment.rules.inc
Implements Rules condition callback: check whether a payment uses one of the selected payment methods.

File

./payment.rules.inc, line 486
Rules integration.

Code

function payment_rules_condition_payment_method_comparison(PaymentMethod $payment_method, array $pmids) {
  return in_array($payment_method->pmid, $pmids);
}