diff --git a/modules/payment/commerce_payment.module b/modules/payment/commerce_payment.module index 2354530..82c0fbc 100644 --- a/modules/payment/commerce_payment.module +++ b/modules/payment/commerce_payment.module @@ -489,9 +489,12 @@ function commerce_payment_views_api() { */ function commerce_payment_methods() { $payment_methods = &drupal_static(__FUNCTION__); + global $theme; - // If the payment methods haven't been defined yet, do so now. - if (!isset($payment_methods)) { + // If the payment methods haven't been defined yet, do so now. However, since + // payment method display titles may be generated through the theme layer, do + // not return any payment methods until after the theme has loaded. + if (!isset($payment_methods) && isset($theme)) { $payment_methods = array(); // Build the payment methods array, including module names for the purpose