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-display-membership-levels-for-posts.php
Last active November 12, 2020 18:53 — forked from greathmaster/pmpro-display-membership-levels-for-posts.php
PMPro Display membership levels for posts and pages
<?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)
@ronalfy
ronalfy / my_pmpro_fee-to-certain-levels.php
Last active September 22, 2020 15:53 — forked from dparker1005/my_pmpro_add_account_creation_fee.php
Charge Processing Fee to Certain Levels
<?php
/**
* If user checkouts in certain levels, add a processing fee.
*
* 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_account_creation_fee( $checkout_level ) {
@ronalfy
ronalfy / remove-pmpro-gpf-restriction.php
Last active September 16, 2020 13:34 — forked from andrewlimaza/remove-pmpro-gpf-restriction.php
Remove Paid Memberships Pro content restriction for Google Product Feed
<?php
/**
* Disabled the PMPro content restriction forr WooCommerce GPF plugin.
* Add this code to your WordPress site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function disable_pmpro_for_woocommerce_gpf( $content ) {
if ( ! is_single() && isset( $_REQUEST['woocommerce_gpf' ] ) && $_REQUEST['woocommerce_gpf'] == 'google' ) {
remove_filter('the_content', 'pmpro_membership_content_filter', 5);
}
@ronalfy
ronalfy / My_PMPro_Directory_Widget.php
Last active March 23, 2020 14:41 — forked from dparker1005/My_PMPro_Directory_Widget.php
Add widget to Member Directory page to filter results.
<?php
/**
* Plugin Name: My PMPro Directory Widget
* Description: Add widget to Member Directory page to filter results.
*/
class My_PMPro_Directory_Widget extends WP_Widget {
/**
* Sets up the widget
*/