MailchimpEcommerceUbercartAdminSettings.php in Mailchimp E-Commerce 8
File
modules/mailchimp_ecommerce_ubercart/src/Form/MailchimpEcommerceUbercartAdminSettings.php
View source
<?php
namespace Drupal\mailchimp_ecommerce_ubercart\Form;
use Drupal\Core\Form\FormStateInterface;
use Drupal\mailchimp_ecommerce\Form\MailchimpEcommerceAdminSettings;
class MailchimpEcommerceUbercartAdminSettings extends MailchimpEcommerceAdminSettings {
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
if (!empty($store)) {
$default_currency = $store
->getDefaultCurrencyCode();
if (isset($form['mailchimp_ecommerce_currency']['#options'][$default_currency])) {
$form['mailchimp_ecommerce_currency']['#default_value'] = $default_currency;
}
}
$form['platform']['#default_value'] = 'Drupal Ubercart';
return $form;
}
}