I have enabled access to to the subscription module for authorized users but also do not have the subscription block enabled. Despite that, the button displays in the right hand column, even if the user has the role for which the subscription is designed. What am I doing wrong?

Comments

thededalus’s picture

Title: Paypal button displays though subscription block is disabled » figured work around

I modified lm_paypal_subscriptions.module:

function lm_paypal_subscribe($subid = null, $display = 15, $button_url = '', $nid = null, $account = null) {
  _lm_paypal_subscriptions_ini();
  global $user;
  global $_lm_paypal_debug;
  global $_lm_paypal_host;
  global $_lm_paypal_business;
  global $_lm_paypal_subscriptions_inprogress;
  global $_lm_paypal_drupal_major;
  global $_lm_paypal_js_hide_email;

  //my snippet starts here. if user has paid role then the rest of the function is skipped and the block doesn't display.
  if ( 'paid subscriber' == $user->roles['3'] ) {
  return $output;
  }
  //my snippet ends here
fehin’s picture

sub