• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Stripe Plugins

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • My Downloads
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Topics / Subscription Payments Addon: Bug in get_cancel_link

[Resolved] Subscription Payments Addon: Bug in get_cancel_link

· ·

Home › Forums › Stripe Payments Plugin › Subscription Payments Addon: Bug in get_cancel_link

Tagged: bug

This topic contains 2 replies, has 2 voices, and was last updated by  alexanderfoxc 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • January 27, 2021 at 1:32 am #3574

    zebfross
    Participant

    The get_cancel_link function is broken for subscriptions because it errors out if the subscription is active when instead it should be if the subscription is not active. Partial code to repro the issue with an active $subscription_id.

    
    		$asp = new ASPSUB_subscription($subscription_id);
    		print($asp->get_cancel_link());
    

    The offending code is in asp-subscription-class.php:

    
    	public function get_cancel_link() {
    		if ( $this->cancel_url ) {
    			return $this->cancel_url;
    		}
    		if ( $this->is_active() ) {
    			$this->last_error = __( 'Subscription is not active', 'asp-sub' );
    			return false;
    		}
    
    January 27, 2021 at 1:00 pm #3576

    alexanderfoxc
    Keymaster

    Hi and thank you for your report.

    This is a bug indeed. Good thing is that get_cancel_link() function you mentioned is currently used by [asp_show_my_transactions] shortcode only, so it does not affect any other parts where the cancellation URL is used (email merge tag, subscription details page etc).

    This will be fixed in the upcoming version of the Subscriptions add-on.

    January 31, 2021 at 10:04 pm #3580

    alexanderfoxc
    Keymaster

    Subscriptions add-on version 2.0.29 has been released. It has this issue fixed.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Primary Sidebar

Search

Featured Addons and Extensions

  • Subscription Payments Addon
  • Additional Custom Fields
  • Secure Downloads Addon
  • Apple Pay and Google Pay

Addon Bundle

Stripe Payments Addon Bundle

Support Links

  • Support Forum
  • Forum Registration

Copyright © 2021 | Stripe Plugins | A member of the Tips and Tricks HQ family.