Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/003f441485c385072dc78786a34a5432 to your computer and use it in GitHub Desktop.
Save kimcoleman/003f441485c385072dc78786a34a5432 to your computer and use it in GitHub Desktop.
Example SQL to duplicate restrictions for level ID 1 to also restrict for level ID 2
#Example SQL to duplicate restrictions for level ID 1 to also restrict for level ID 2
INSERT IGNORE INTO wp_pmpro_memberships_pages (membership_id, page_id)
SELECT '2', page_id FROM wp_pmpro_memberships_pages WHERE membership_id = 1;
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Bulk methods to restrict access to posts, pages, and CPTs for a specific membership level ID via MySQL" at Paid Memberships Pro here: https://www.paidmembershipspro.com/bulk-methods-to-restrict-access-to-posts-pages-and-cpts-for-a-specific-membership-level-id-via-mysql/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment