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 | |
/* | |
Use this recipe in combination with MyCRED to award points to members when signing up | |
for Level 1 membership. This code gist could be customized to give points for another | |
membership level ID, award recurring points for each subscription payment, and more. | |
MyCRED can be downloaded/configured here: https://wordpress.org/plugins/mycred/ | |
*/ | |
// Register Hook for PMPro Membership Points at Signup |
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 | |
/******************************* | |
** DOKAN PDF INVOICE FILTERS ** | |
*******************************/ | |
/** | |
* Replace the main shop name with "Store Info" (actual shop name listed below) | |
*/ | |
add_filter( 'wpo_wcpdf_shop_name', 'wpo_wcpdf_add_dokan_shop_name', 10, 1 ); | |
function wpo_wcpdf_add_dokan_shop_name ( $shop_name ) { |
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
//add this line to your active theme's functions.php or a custom plugin | |
add_filter('pmpro_register_redirect', '__return_false'); |
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
/* | |
Clear out all PMPro member and report data. (Back up your database first. Use at your own risk!!!) | |
This will delete all orders, members/level data, and reporting data. | |
Your levels, discount codes, and settings will remain in place. | |
All users will remain users (without memberships). | |
All subscriptions at the gateway will remain active. | |
To Use: | |
* Copy this code into your active theme's functions.php or a custom WP plugin. | |
* Navigate to /wp-admin/?pmprocleardata=1 when logged in as an admin. |
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
-- Select users in WordPress without specific user meta key | |
-- * Replace meta_name for your meta key | |
-- * Replace > 0 for the minimum user ID | |
SELECT wp_users.ID | |
FROM wp_users | |
WHERE wp_users.ID > 0 | |
AND wp_users.ID NOT IN ( | |
SELECT DISTINCT user_id FROM wp_usermeta WHERE meta_key = 'meta_name' | |
) |
NewerOlder