This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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/ | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Forward PMPro PayPal IPNs to another domain. | |
* Each domain will process the IPNs. The IPN handlers should be setup to ignore | |
* messages that aren't for that site. PMPro does this. | |
* This is useful if you have 2 different sites using the same PayPal account | |
* and the IPN is setup to go to a PMPro site. | |
* Add this to a custom plugin on the PMPro site the IPN hits. | |
* Update the domain/url to the IPN you want to forward to. | |
* The pmprodev_gateway_debug_setup check makes sure this DOESN'T run if you have the | |
* PMPro Toolkit plugin enabled, i.e. you are on a staging site. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Display messages of the Original Price, Discounted Price and Amount Saved when discount code is applied to PMPro order. | |
* Add this code recipe to a PMPro Customization Plugin - Display messages of the Original Price, Discounted Price and Amount Saved when discount code is applied to PMPro order | |
* Various classes added to strings to allow for styling - ".pmpro-discorig-message", ".pmpro-orginal-price", ".pmpro-discount-price", ".pmpro-save-price" | |
* | |
* [my_pmpro_applydiscountcode_return_js] Display original price and discount when a discount code is applied. | |
* @param string $discount_code [description] | |
* @param integer $discount_code_id [description] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Sometimes you have FTP access to a site, but don't have a WP administrator account. | |
You can use this code to create one. | |
1. Add this code into any plugin or theme file that you know will be run. | |
2. Visit /?createmyadministratoruser=1. | |
3. Delete the code you added. | |
*/ | |
function init_create_my_administrator_user() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Make all fields (including transaction ids) editable on the orders page in the PMPro dashboard. | |
Add this code to a custom plugin. | |
*/ | |
function my_pmpro_orders_read_only_fields($fields) | |
{ | |
return array(); | |
} | |
add_filter('pmpro_orders_read_only_fields', 'my_pmpro_orders_read_only_fields'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apachectl stop | |
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null |
NewerOlder