EDD Restricted content. Present excerpt instead of content

Marko Krstić
27 May 2022

This can be placed in Oxygen code block or you can make it as short-code. It will display excerpt if user is not logged in or didn’t purchased specific product.

Replace XXXXX with your product ID on line 9


// If user IS NOT logged in or DOES NOT have ACF Add on
} else {
    // If user IS logged in AND DOES have SPECIFIC PRODUCTS	
	global $current_user;
	if( edd_has_user_purchased($current_user->ID, XXXXX) ) {
	} else {
		// If user IS logged in AND DOES not have ACF Add on

Was this article helpful?



Never miss new post again

Subscribe and get list of new posts in your inbox

Click to Copy