Skip to content

Instantly share code, notes, and snippets.

Avatar

Theuns Coetzee ipokkel

View GitHub Profile
@ipokkel
ipokkel / my-pmpro-init-date-picker.php
Last active Oct 23, 2020
Date picker for PMPro Register Helper #pmpro #datepicker
View my-pmpro-init-date-picker.php
<?php
/**
* This recipe creates a custom text field for membership registration
* using a jQuery datepicker widget to visually pick a date.
*
* For further options to tweak the date picker to suit your requirements
* you may refer to the official documentation.
* @link https://api.jqueryui.com/datepicker/
*
* @requires Register Helper Add On
@ipokkel
ipokkel / prorate-fiscal-year-per-quarter.php
Created Aug 11, 2020
Prorate initial payment per quarater based on subscription delay for a yearly (fiscal) recurring subscription
View prorate-fiscal-year-per-quarter.php
<?php
/**
* This recipe prorates initial payment per quarter based on subscription delay
* for a yearly (fiscal) recurring subscription.
*
* Requires Subscription Delay and Proration Add Ons.
*
* 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.
@ipokkel
ipokkel / levels.php
Created Aug 7, 2020
Custom PMPro levels page template that changes the level "Select" button text to "Downgrade" or "Upgrade" depending on the level ID being lower or higher than the current user's level.
View levels.php
<?php
/**
* This recipe is a custom PMPro Levels Template that changes the
* level "Select" button text to "Downgrade" or "Upgrade" depending on
* the level ID being lower or higher than the current user's level.
*
* This recipe assumes that level were created in order of level cost,
* the cheapest level having the lowest level ID and the most expensive
* having the highest level ID.
*
@ipokkel
ipokkel / change-text-for-paid-memberships-pro.ph.php
Created Aug 6, 2020
Change or translate text strings for Paid Memberships Pro
View change-text-for-paid-memberships-pro.ph.php
<?php
/**
* This recipe changes localized text strings for
* Paid Memberships Pro using the gettext filter.
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*
* These changes should preferably be changed with customized language files
* and saved in /wp-content/languages/plugins/plugin-name
* @link https://developer.wordpress.org/plugins/internationalization/localization/#using-localizations
@ipokkel
ipokkel / my-pmpro-email-recipient-billable-invoice.php
Last active Aug 5, 2020
Send a billable invoice to any email address from the Memberships > Orders page. #pmpro #orders #email
View my-pmpro-email-recipient-billable-invoice.php
<?php
/**
* This recipe allows you to send a billable invoice
* from the Memberships > Orders page to any email address.
*
* 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/
*/
@ipokkel
ipokkel / my-pmprorh-init-pause-access.php
Last active Jul 30, 2020
Pause membership content access checkbox Register Helper example field.
View my-pmprorh-init-pause-access.php
<?php
/**
* This recipe creates a custom fields for membership registration.
*
* Pause content access checkbox for this article:
* @link https://www.paidmembershipspro.com/block-pause-members-access-restricted-content/
*
* @requires Register Helper Add On
* @link https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/
*
@ipokkel
ipokkel / pmpro-redirect-to-user-page.php
Last active Jul 30, 2020 — forked from strangerstudios/pmpro-redirect-to-user-page.php
Plugin to work with PMPro and PMPro User Pages to redirect someone to their latest user page on login.
View pmpro-redirect-to-user-page.php
<?php
/**
* This recipe redirects members to their User Page on login.
*
* This recipe assumes the User Pages Add On is installed and configured.
* @link https://www.paidmembershipspro.com/add-ons/pmpro-user-pages/
*
* 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.
@ipokkel
ipokkel / my-pmprorh-read-only.php
Created Jul 29, 2020
Set Register Helper field to read only for members but not administrators or membership managers with the readonly field option.
View my-pmprorh-read-only.php
<?php
/**
* This recipe creates a custom fields for membership registration
* that is readonly on the user edit profile for members and
* editable by administrators or users with the membership manager role.
*
* This recipe assumes that the registration field is required during checkout.
*
* @requires Register Helper Add On
* @link https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/
@ipokkel
ipokkel / change-text-for-add-member-from-admin.php
Created Jul 27, 2020
Translate or change text for Add Member From Admin
View change-text-for-add-member-from-admin.php
<?php
<?php
/**
* This recipe changes localized text strings for
* Add Member from Admin using the gettext filter.
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*
* 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.
@ipokkel
ipokkel / my-custom-admin-css.php
Created Jul 27, 2020
Example of adding custom CSS for the Admin area in WordPress. This example hides the Payment dropdown and total fields in Add Member From Admin
View my-custom-admin-css.php
<?php
/**
* This recipe is an example of how to add custom CSS to WordPress Admin
*
*
* 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/
*/
You can’t perform that action at this time.