Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/8bb3e260615512b41f64d948afb55d7e to your computer and use it in GitHub Desktop.
Save kimcoleman/8bb3e260615512b41f64d948afb55d7e to your computer and use it in GitHub Desktop.
Filter to add additional post types for protection and individual sale using Addon Packages for Paid Memberships Pro.
<?php
/**
* Filter to add additional post types for protection and individual sale using Addon Packages for Paid Memberships Pro.
* You should also install the Custom Post Type (CPT) Membership Access Add On so that your CPT can be properly restricted.
* https://www.paidmembershipspro.com/add-ons/custom-post-type-membership-access/
*
*/
function add_new_cpts_pmproap_supported_post_types( $post_types ) {
$post_types[] = 'custom_courses';
return $post_types;
}
add_filter( 'pmproap_supported_post_types', 'add_new_cpts_pmproap_supported_post_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment