Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid fatal error with recurring donation using GiveWP core patch #4255

Merged
merged 2 commits into from Sep 20, 2019

Conversation

mehul0810
Copy link
Contributor

Description

This PR resolves the fatal error issue when Stripe is not enabled payment gateway in GiveWP core and recurring 1.9.3 is used.

How Has This Been Tested?

Please check the testing video: https://www.loom.com/share/e65239b333124cd195e219a61afdcf70

Types of changes

Bugfix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.


// Hardcoded recurring plugin basename to show notice even when recurring addon is deactivated.
$recurring_plugin_basename = 'give-recurring/give-recurring.php';
$recurring_plugin_data = get_plugin_data( WP_CONTENT_DIR . '/plugins/' . $recurring_plugin_basename );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mehul0810 you should use https://developer.wordpress.org/reference/functions/plugin_dir_path/ or similar in case this isn't the standard path.

@DevinWalker DevinWalker merged commit 2e92212 into develop Sep 20, 2019
@DevinWalker DevinWalker deleted the issue/fatal-error branch September 20, 2019 06:28
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.

None yet

2 participants