public function PaymentMethod::setDefault in Commerce Core 8.2
Sets whether this is the user's default payment method.
Parameters
bool $default: Whether this is the user's default payment method.
Return value
$this
Overrides PaymentMethodInterface::setDefault
File
- modules/
payment/ src/ Entity/ PaymentMethod.php, line 168
Class
- PaymentMethod
- Defines the payment method entity class.
Namespace
Drupal\commerce_payment\EntityCode
public function setDefault($default) {
$this
->set('is_default', $default);
return $this;
}