Example #1
0
 /**
  * Display fields below payment method in checkout
  */
 public function payment_fields()
 {
     // Display description above issuers
     parent::payment_fields();
     $test_mode = Mollie_WC_Plugin::getSettingsHelper()->isTestModeEnabled();
     $ideal_issuers = Mollie_WC_Plugin::getDataHelper()->getIssuers($test_mode, $this->getMollieMethodId());
     $selected_issuer = $this->getSelectedIssuer();
     $html = '<select name="' . Mollie_WC_Plugin::PLUGIN_ID . '_issuer_' . $this->id . '">';
     $html .= '<option value=""></option>';
     foreach ($ideal_issuers as $issuer) {
         $html .= '<option value="' . esc_attr($issuer->id) . '"' . ($selected_issuer == $issuer->id ? ' selected=""' : '') . '>' . esc_html($issuer->name) . '</option>';
     }
     $html .= '</select>';
     echo wpautop(wptexturize($html));
 }