You are here

public function PaymentMethod::isDefault in Commerce Core 8.2

Gets whether this is the user's default payment method.

Return value

bool TRUE if this is the user's default payment method, FALSE otherwise.

Overrides PaymentMethodInterface::isDefault

File

modules/payment/src/Entity/PaymentMethod.php, line 161

Class

PaymentMethod
Defines the payment method entity class.

Namespace

Drupal\commerce_payment\Entity

Code

public function isDefault() {
  return (bool) $this
    ->get('is_default')->value;
}