public static function PaymentMethod::loadFromOrder in Ubercart 8.4
Returns the payment method entity for a specific order.
Parameters
\Drupal\uc_order\OrderInterface $order: The order from which the payment method should be loaded.
Return value
static|null The entity object or NULL if there is no valid payment method.
1 call to PaymentMethod::loadFromOrder()
- uc_payment_tokens in payment/
uc_payment/ uc_payment.tokens.inc - Implements hook_tokens().
File
- payment/
uc_payment/ src/ Entity/ PaymentMethod.php, line 144
Class
- PaymentMethod
- Defines a configured payment method.
Namespace
Drupal\uc_payment\EntityCode
public static function loadFromOrder(OrderInterface $order) {
if ($method = $order
->getPaymentMethodId()) {
return static::load($method);
}
return NULL;
}