Score:0

Hide pane based on cart state

tr flag

Can anyone point me to a right direction. I have created a custom Checkout flow and it has payment pane in it.

I'm trying to skip payment pane if the Cart state changed (default cart state is draft) I couldn't find any documentation for this in Drupal Commerce documentation or through Google.

I don't know what hook is available for this (if there is any) or where to start.

Thanks

Score:2
tr flag

Turns out there's already a documentation for this and I missed it. For anyone who has the same problem,

You can implement the isVisible() function on your custom checkout pane. https://docs.drupalcommerce.org/commerce2/developer-guide/checkout/create-custom-checkout-pane

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.