Allow customers to update their cards in disabled gateways using Easy Digital Downloads Recurring Payments

Last year, GravityView was using PayPal Pro to process credit card transations with our shopping cart, Easy Digital Downloads. Over time, we became frustrated with the error rate of PayPal notifications: PayPal kept telling us the country code wasn’t set. But it was. This was preventing customers from checking out, so GravityView switched to using Stripe for credit card transactions.

Now, a year later, customers with outdated credit cards who paid with PayPal aren’t able to update their billing information on the GravityView website. Customers can’t see the “Update Card” link because the PayPal Pro gateway is disabled. Because the PayPal Pro gateway is inactive, the link to update the credit card details for a subscription isn’t visible. Continue reading “Allow customers to update their cards in disabled gateways using Easy Digital Downloads Recurring Payments”

How to get all downloads in Easy Digital Downloads

Easy Digital Downloads defaults to using 10 results per page when using the get_products() method. You can modify this default using the edd_api_results_per_page filter.

Here’s how to fetch all products at once:

$EDD_API = new EDD_API;

// Force EDD to show all the downloads at once.
add_filter('edd_api_results_per_page', 'modify_edd_api_results_per_page' );

// Get all the EDD products
$products = $EDD_API->get_products();

// Restore sanity to EDD results per page.
remove_filter('edd_api_results_per_page', 'modify_edd_api_results_per_page' );

/**
* Modify the number of results fetched by EDD
* @param int $per_page Previous results per page setting
* @return int New results per page setting. If you have this many, you're in trouble.
*/
function results_per_page($per_page) {
return 99999999; // Yeah, you've got lots of products!
}