Skip to content

Instantly share code, notes, and snippets.

View MaximilianoRicoTabo's full-sized avatar

Maximiliano Rico MaximilianoRicoTabo

  • -
  • Montevideo - La Paloma
  • 13:35 (UTC -03:00)
View GitHub Profile
@MaximilianoRicoTabo
MaximilianoRicoTabo / Maximiliano_Rico_-_Software_Developer.md
Last active March 27, 2025 20:50
Maximiliano Rico Curriculum Vitae
@MaximilianoRicoTabo
MaximilianoRicoTabo / allow_or_deny_checkout_on_restricted_countries.php
Created February 26, 2025 21:43
This gist works over a list of a countries and levels. It restricts the checkout to certain levels to certain countries. Either denying or Allowing
<?php // do not copy this line.
/**
* This recipe allow or deny the checkout of a level to certain countries.
* Modify $restriction_mode to use 'deny' or 'allow'. Modify $restricted_countries using level ids as keys and country codes as values.
*
* 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/
*/
<?php // do not copy this line.
/**
* This recipe does will change the price for a membership by the date
*
* 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 pmpro_checkout_sale_price( $level ) {
@MaximilianoRicoTabo
MaximilianoRicoTabo / custom_pmpro_member_directory_sql_search_where.php
Created January 7, 2025 18:05
Custom function to add custom sql search where clause to the member directory search query
<?php
/**
* Custom function to add custom sql search where clause to the member directory search query
*
* 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/
*/
<?php
/**
* This recipe tweak pmpro buttons
*
* 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/
*/
@MaximilianoRicoTabo
MaximilianoRicoTabo / excude_level_from_checkout_page.php
Created November 1, 2024 20:21
Exclude certain levels from checkout page
<?php
function pmpro_custom_filter_checkout_levels( $pmpro_level ) {
// get the current user
$user = wp_get_current_user();
// if the user is logged in
if ( $user->ID ) {
// get the user's membership level
@MaximilianoRicoTabo
MaximilianoRicoTabo / fix-approvals-bug.php
Last active October 25, 2024 19:17
Fix Approval bug by removing Add On filter and adding a custom one
<?php
/**
* This recipe fix an Approvals Add On bug by removing Add On filter and adding a custom one
*
* 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/
*/
@MaximilianoRicoTabo
MaximilianoRicoTabo / convert.php
Created October 18, 2024 12:40
base convert function
<?php
$member_number = base_convert( $hex_value, 16, 10 );
?>
@MaximilianoRicoTabo
MaximilianoRicoTabo / remove_stripe_webhook_notice.php
Created October 3, 2024 14:55
Remove stripe webhook setup notice
<?php
/**
* Remove stripe webhook setup notice
*
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
add_action('admin_init', 'remove_pmpro_gateway_stripe_notice');
function remove_pmpro_gateway_stripe_notice() {
remove_action( 'admin_notices', array( 'PMProGateway_stripe', 'show_stripe_webhook_setup_notice' ) );
}
@MaximilianoRicoTabo
MaximilianoRicoTabo / pmpro_custom_phone.php
Created September 23, 2024 22:04
sync billing phone with a custom user field called pmpro_custom_phone
<?php
/**
* This recipe bring Order billing info phone number into profile 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/
*/