function commerce_paypal_ec_block_info in Commerce PayPal 7.2
Implements hook_block_info().
File
- modules/
ec/ commerce_paypal_ec.module, line 1659 - Implements PayPal Express Checkout in Drupal Commerce checkout.
Code
function commerce_paypal_ec_block_info() {
$blocks = array();
// @todo Do not hard code the payment method instance ID.
$payment_method = commerce_payment_method_instance_load('paypal_ec|commerce_payment_paypal_ec');
// Only define the PayPal banners program block if PayPal Credit is enabled.
if (isset($payment_method['settings']['enable_bml']) && $payment_method['settings']['enable_bml'] == TRUE) {
$blocks['commerce_paypal_ec_banners'] = array(
'info' => t('PayPal Credit banner'),
'cache' => DRUPAL_CACHE_GLOBAL,
);
}
return $blocks;
}