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

Payments Plugin for Stripe

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • Terms & Conditions
    • My Downloads
    • License Key
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
    • Email Support for Customers
  • 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 has 2 replies, 2 voices, and was last updated 4 years, 3 months ago by alexanderfoxc.
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
    Participant

    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
    Participant

    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.
Log In

Primary Sidebar

Featured Addons and Extensions

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

Addon Bundle

Stripe Payments Addon Bundle

A Simple & Lightweight Plugin

Our Philosophy with the Plugin

Support Links

  • Support Forum
  • Support Contact

Search

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