View pmpro-uk-taxes.php
<?php | |
/** | |
* 1. Adds 20% tax text to the level cost text. | |
* 2. Adds 20% tax to invoice if checking out as UK customer. | |
* 3. Adds 20% tax if UK 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/ |
View pmpro-deregister-jquery.php
<?php | |
/** | |
* Deregister core WordPress scripts and use CDN jQuery instead. | |
* | |
* Not recommended for wide-use. May neeed to update this when WordPress 5.6 is released. | |
* | |
* 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/ |
View pmpro-jquery-dequeue.php
<?php | |
/** | |
* Dequeue's theme's custom JS handler, forces jQuery as a dependency. Testing code is commented out below. | |
* | |
* 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_dequeue_script_in_theme() { |
View pmpro-restrict-categories-sub-site.php
<?php | |
/** | |
* Restrict categories on the sub-site of a MS network. | |
* Install as an mu-plugin (advanced users only) | |
*/ | |
function my_pmpro_member_pmpro_has_membership_access_filter( $access, $post, $user, $levels ) { | |
// If main site, leave alone. | |
if ( is_main_site() || is_admin() ) { | |
return $access; |
View pmpro-acf-restrict-domains-rh.php
<?php | |
/** | |
* Requires ACF Pro. Registers an options page and restricts by level and domain. Add approved domains via Register helper (can be optional) | |
* | |
* !important | |
* Change 12 to level you'd like to have the domain field on. | |
* Change 13 to level ID you'd like to restrict. | |
* | |
* 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. |
View pmpro-rh-restrict-level.php
<?php | |
function my_pmprorh_init() { | |
// don't break if Register Helper is not loaded | |
if ( ! function_exists( 'pmprorh_add_registration_field' ) ) { | |
return false; | |
} | |
$fields = array(); | |
$fields[] = new PMProRH_Field( | |
'besuchen_webinar', |
View pmpro-display-membership-levels-for-posts.php
<?php | |
/** | |
* Show levels for a post/page in the 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/ | |
*/ | |
function pmprobe_manage_posts_columns( $columns, $post_type) |
View pmpro-bulk-approve-members.php
<?php | |
/** | |
* Bulk approve existing members. | |
* | |
* 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/ | |
*/ | |
/** |
View pmpro-acf-add-options-page.restrict-levels-domains.php
<?php | |
/** | |
* Requires ACF Pro. Registers an options page and restricts by level and domain. | |
* | |
* 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/ | |
*/ |
View pmpro-email-confirmation-add-body-classes.php
<?php | |
/** | |
* Set up classes for email confirmation. | |
* | |
* Available classes: | |
* | |
* 1. Logged in: pmpro-body-is-logged-in | |
* 2. Logged out: pmpro-body-is-logged-out | |
* 3. Logged in and and active member: pmpro-body-has-membership-level, pmpro-body-has-membership-level-n | |
* 4. Logged in and awaiting confirmation: pmpro-body-pending-confirmation |
NewerOlder