Home / Disable / Disable delayed customer recalculations
Duplicate Snippet

Embed Snippet on Your Site

Disable delayed customer recalculations

In EDD 3.1.1.4+, to improve checkout performance, the recalculation of a customer's stats were deferred by 5 minutes. This speeds up the checkout experience for customers dramatically. This has no impact on the customer accessing their content or purchased products, and is used only for internal queries and stats calculations for customers.

In some cases, it may be desirable to not delay this action. If you want to ensure that there is no delay in the recalculation of the customer's stats, you can use this snippet.

Code Preview
php
<?php
/**
 * Bypasses the CRON event that is scheduled 5 minutes after a purchase that recalculates a customers stats.
 * 
 * Note: This may impact the performance of the checkout process.
 */
add_filter( 'edd_recalculate_bypass_cron', '__return_true' );

Comments

Add a Comment