Home / Admin / Limit Purchase Total
Duplicate Snippet

Embed Snippet on Your Site

Limit Purchase Total

Sets a purchase amount and prevents customers from purchasing more than that amount at one time.

Code Preview
php
<?php
function pw_edd_limit_total_purchase() {
	
	if( edd_get_cart_total() > 100 ) {
		edd_set_error( 'too_much', 'You cannot purchase that much at one time.' );
	}
}
add_action( 'edd_checkout_error_checks', 'pw_edd_limit_total_purchase' );

Comments

Add a Comment