Skip to content

Instantly share code, notes, and snippets.

View ronalfy's full-sized avatar
🏠
Working from home

Ronald Huereca ronalfy

🏠
Working from home
View GitHub Profile
@ronalfy
ronalfy / pmpro-check-members-restricted-content.php
Created November 6, 2020 23:17
PMPro - Allow Pending Check Members Access to Restricted Content
<?php
/**
* Allow pay-by-check pending access to full site.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpropbc_pmpro_has_membership_access_filter( $hasaccess, $post, $user, $post_membership_levels ) {
@ronalfy
ronalfy / pmpro-mmpu-override-checkout-page.php
Created November 6, 2020 22:49
PMPro - MMPU Override Checkout Page
<?php
/**
* The recipe checks for a /paid-memberships-pro/pages/checkout.php in the child theme
* Please keep checkout.php up to date as MMPU is updated.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
@ronalfy
ronalfy / pmpro-max-char-checkout-field.php
Created November 6, 2020 22:29
PMPro - Set Maximum Character Count Checkout Field
<?php
/**
* Forces maxinput on input fields on the checkout page.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_checkout_page_min_number() {
@ronalfy
ronalfy / pmpro-add-start-date-membership-account-table.php
Created November 6, 2020 22:18
PMPro - Add Start Date Membership Account Table
<?php
/**
* Gets the start date for a user and outputs it to the account page membership table.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_add_extra_column_members_table() {
@ronalfy
ronalfy / pmpro-exclude-tos-mmpu-group.php
Created November 5, 2020 21:07
PMPro - Exclude TOS MMPU Group
<?php
/**
* Exclude certain levels from a terms of service. If you are on MMPU, you can exclude a group.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
/**
@ronalfy
ronalfy / pmpro-mg-login-logout.php
Last active November 5, 2020 18:40
PMPro - Membership Homepages + Login/Logout Plugin
<?php
/**
* Compatibility with Membership Homepages, Redirect_To, and Login/Logout plugin.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
/**
@ronalfy
ronalfy / pmpro-get-membership-levels-post.php
Created November 2, 2020 15:03
PMPro - Function for Getting Membership Levels for Postt
<?php
/**
* Function for determining levels needed for post/page.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
/**
@ronalfy
ronalfy / pmpro-blanket-canadian-tax.php
Created November 2, 2020 14:12
PMPro - Blanket Canadian Tax
<?php
/**
* 1. Adds 13% tax text to the level cost text.
* 2. Adds 13% tax to invoice if checking out as Canadian customer.
* 3. Adds 13% tax if Canadian to checkout and invoice.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
@ronalfy
ronalfy / pmpro-exclude-levels-groups-tos.php
Created October 30, 2020 15:37
PMPro - Exclude Levels / Groups Terms of Service
<?php
/**
* Exclude certain levels from a terms of service. If you are on MMPU, you can exclude a group.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
/**
@ronalfy
ronalfy / pmpro-add-rh-approvals.php
Created October 29, 2020 14:12
PMPro - Add RH to Approval Emails
<?php
/**
* Adds Register Helper Fields to the Approvals Email.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/