fixed materio_commerce/materio_commerce.module
This commit is contained in:
parent
b1876efa70
commit
8d8aa5e14b
|
@ -229,8 +229,10 @@ function materio_commerce_form_user_form_alter(&$form, &$form_state, $form_id) {
|
|||
$subscription_url = $first_subscription->toUrl();
|
||||
$subscription_title = $first_subscription->getTitle();
|
||||
$subscription_state = $first_subscription->get('state')->first()->getValue()['value'];
|
||||
$subscription_payment_method = $first_subscription->getPaymentMethod();
|
||||
$subscription_payment_method_label = $subscription_payment_method->label()->render();
|
||||
$subscription_payment_method_label = "none";
|
||||
if ( $subscription_payment_method = $first_subscription->getPaymentMethod() ){
|
||||
$subscription_payment_method_label = $subscription_payment_method->label()->render();
|
||||
}
|
||||
$subscription_link = Link::fromTextAndUrl(t("subscription @title @state [@pm_label]", array(
|
||||
'@title' => $subscription_title,
|
||||
'@state' => $subscription_state,
|
||||
|
|
Loading…
Reference in New Issue