You are here

public function Donation::isVisible in Commerce Donate 8

Determines whether the pane is visible.

Return value

bool TRUE if the pane is visible, FALSE otherwise.

Overrides CheckoutPaneBase::isVisible

1 call to Donation::isVisible()
Donation::buildPaneSummary in src/Plugin/Commerce/CheckoutPane/Donation.php
Builds a summary of the pane values.

File

src/Plugin/Commerce/CheckoutPane/Donation.php, line 28

Class

Donation
Provides the donation pane.

Namespace

Drupal\commerce_donate\Plugin\Commerce\CheckoutPane

Code

public function isVisible() {

  // Hide the pane if there's already a donation order item?
  $order_item = $this
    ->getOrderItem();
  if ($order_item) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}