Skip to content

Instantly share code, notes, and snippets.

View andrewlimaza's full-sized avatar

Andrew Lima andrewlimaza

View GitHub Profile
@ideadude
ideadude / my_sync_stripe_events.php
Created March 13, 2020 17:43
Synchronize Stripe invoice.payment_succeeded Events in PMPro.
/**
* Synchronize Stripe invoice.payment_succeeded Events
* Warning. This code will update your database,
* create new orders, and potentially email your customers.
* Proceed with caution. Back up your database.
* You will likely want to pair this script with a plugin
* or script to disable all email.
* The default limit is 200 events. You may need to increase this
* or update the script to paginate and run events in batches.
* The default delay between event calls is 2 seconds.
@dparker1005
dparker1005 / pmpro_csv_export_add_views_column.php
Created May 5, 2020 16:01
Adds content from Visits, Views, and Logins report to Member List to CSV export.
<?php
// Copy from below here...
/*
* Adds content from Visits, Views, and Logins report to Member List to CSV export.
*
* Here is where all the columns in the Visits, Views, and Logins report are filled
* in case you would like to customize this Gist:
* https://github.com/strangerstudios/paid-memberships-pro/blob/c3129bfce929bb4f5e7dd03f5efd74c209a5530e/adminpages/reports/login.php#L215-L252
@sc0ttkclark
sc0ttkclark / pmpro-disable-email-html-cleanup.php
Last active January 31, 2022 18:07
This recipe will disable the HTML removal from email templates when using unsupported tags.
<?php // do not copy this line.
/**
* This recipe will disable the HTML removal from email templates when using unsupported tags.
*
* 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/
*/
@dparker1005
dparker1005 / filter_pmpro_send_200_http_response.php
Created November 8, 2021 15:47
Disables the `pmpro_send_200_http_response()` function.
<?php
// Copy from below here...
/**
* Disables the `pmpro_send_200_http_response()` function.
*
* That function was implemented in PMPro v2.6.4 to allow IPN/webhook
* handlers to adknowledge the receipt of a webhook before processing
* it in order to avoid timeout issues at the gateway.
@dparker1005
dparker1005 / memberslist_billing_address.php
Created February 28, 2024 16:12
Add the "billing address" column back to the members list and CSV export.
<?php
/**
* Add the "billing address" column back to the members list and CSV export.
*
* Note: This will add the most recent billing address for the user and level
* by looking at the user's order history, not user meta.
*
* 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.