Skip to content

Add 'apply_filters' to 'EDD_Download' class 'support_buy_now()' function return value - #9679

Open
maaprote wants to merge 10000 commits into
awesomemotive:mainfrom
maaprote:patch-1
Open

Add 'apply_filters' to 'EDD_Download' class 'support_buy_now()' function return value#9679
maaprote wants to merge 10000 commits into
awesomemotive:mainfrom
maaprote:patch-1

Conversation

@maaprote

@maaprote maaprote commented Oct 17, 2023

Copy link
Copy Markdown

Since EDD v3.2.2, in some custom payment processors plugins like FastSpring by ProtheusPay (https://proteuspay.com/), the 'Buy Now' functionality stop to work with recurring payments. If that's going to be the default behavior (don't work with recurring payments), the ideal would be at least provide a hook to be able to change that behavior with custom code.

Fixes #

Proposed Changes:

  1. Encapsulate the logic to check whether buy now is supported or not in a new 'is_buy_now_supported' function to be able to apply the filter.
  2. Add the filter 'edd_download_supports_buy_now' in the return value from function 'supports_buy_now'

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants