Last active
August 29, 2015 14:01
-
-
Save amdrew/9e9a1e727de1aba20289 to your computer and use it in GitHub Desktop.
Easy Digital Downloads - Force user accounts for orders over $0.00 in Easy Digital Downloads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Force user accounts for orders over $0.00 in Easy Digital Downloads | |
*/ | |
function sumobi_edd_force_account_creation( $ret ) { | |
$cart = function_exists( 'edd_get_cart_total' ) ? edd_get_cart_total() : false; | |
// if cart has paid products in it, force account creation | |
if ( $cart ) { | |
$ret = (bool) true; | |
} | |
return $ret; | |
} | |
add_filter( 'edd_no_guest_checkout', 'sumobi_edd_force_account_creation' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment