Strangely, if using an integer as the plan_code in recurly it will show up in the subscriptions plan admin list but wont show up on the signup pages.

CommentFileSizeAuthor
#1 integer_string_equality-1900110.patch568 bytes7wonders

Comments

7wonders’s picture

StatusFileSize
new568 bytes

It was because of the === identity check instead of just a == equality check between saved plan codes and recurly plan codes. Thats because the subscriptions with integer plan_codes are saved as integers in variable_set even though they are strings from recurly. Simple fix attached.

7wonders’s picture

Status: Active » Needs review
quicksketch’s picture

Status: Needs review » Fixed

Thanks! Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Eric B.’s picture

This same issue presents itself in 2 more places here: /recurly/includes/recurly.pages.inc

if ($subscription->pending_subscription->plan->plan_code === $plan_code) {

elseif ($subscription->plan->plan_code === $plan_code) {

    foreach ($subscriptions as $subscription) {
      if (!empty($subscription->pending_subscription)) {
        if ($subscription->pending_subscription->plan->plan_code === $plan_code) {
          $variables['filtered_plans'][$plan_code]['selected'] = TRUE;
        }
      }
      elseif ($subscription->plan->plan_code === $plan_code) {
        $variables['filtered_plans'][$plan_code]['selected'] = TRUE;
      }
    }