Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionIs there any way to force Easy Digital Downloads customers to add only single item to card per purchase? In other words, disable shopping card "completely", So that when a customer touches the download button of an item, if he returns to the download archive page, it will be deleted from his shopping cart.
Thanks!
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionIs there any way to force Easy Digital Downloads customers to add only single item to card per purchase? In other words, disable shopping card "completely", So that when a customer touches the download button of an item, if he returns to the download archive page, it will be deleted from his shopping cart.
Thanks!
Share Improve this question asked Jul 12, 2018 at 15:34 morteza rajabzademorteza rajabzade 415 bronze badges1 Answer
Reset to default 3I searched a lot and find a way to do it.
add following to theme functions.php file:
add_filter( 'edd_pre_add_to_cart_contents', '__return_false' );
Source: https://gist.github/amdrew/2192eb02839fcdf9e3d2
Thanks!