View order.html
This file contains 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
<style> | |
@font-face { | |
font-family: 'Noto Serif', serif; | |
src: url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;700&display=swap'); | |
} | |
h1, p, table, span { | |
font-family: 'Noto Serif', serif; | |
} | |
#invoice, table{ |
View retroactively-enroll-members-learndash-pmpro.php
This file contains 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 | |
/** | |
* Retroactively enroll members into LearnDash courses via a cron job (or whenever you want to use this callback). | |
* | |
* Does batches of 50 members at a time that aren't enrolled and should be. | |
* Use a tool like WP Crontrol or manually set up a cron job for this callback to automatically run every couple of minutes or hours. | |
* Add this code to your custom plugin by visiting this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_courses_silent_enroll(){ | |
global $wpdb; |
View pmpro-payment-plan-select-plan-query-param.php
This file contains 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 &pmpropp_chosen_plan=<<plan_id>> in the URL to preselect the payment plan option. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_payment_plan_select_url() { | |
// Only load this on the checkout page. | |
if ( function_exists('pmpro_is_checkout') && !pmpro_is_checkout() ) { | |
return; | |
} |
View admin-access-with-divi-pmpro-series.php
This file contains 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 | |
/** | |
* Give admins access to all series content when editing with Divi. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_series_give_admins_access_always( $hasaccess, $post, $user, $post_membership_levels ) { | |
if ( $hasaccess ) { | |
return $hasaccess; | |
} |
View pmpro-update-jan-1999-to-never.sql
This file contains 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
// Run this SQL query inside your database. | |
// Replace wp_ prefix with your actual table's prefix. | |
// ALWAYS HAVE A BACKUP BEFORE RUNNING ANY SQL DIRECTLY | |
UPDATE `wp_pmpro_memberships_users` SET `enddate` = '0000-00-00 00:00:00' WHERE `enddate` = '1999-01-01 00:00:00'; |
View my-load-shortcode-levels.php
This file contains 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 | |
/** | |
* This registers [pmpro_levels] shortcode to be used in Bricks Builder. | |
* It can be tweaked for other shortcodes that _might_ not render with Bricks. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ (add it to a custom plugin) | |
*/ | |
if ( ! shortcode_exists( 'pmpro_levels' ) ) { | |
add_shortcode("pmpro_levels",function(){ | |
require_once( PMPRO_DIR . "/preheaders/levels.php" ); |
View pmpro-checkout-uf-radio-js-select.php
This file contains 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 | |
/** | |
* Preselect a radio button option at PMPro Checkout sample. | |
* Please tweak this code further based on your own needs. | |
* To add this code to your site, please follow this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_checkout_js_script() { | |
// Only load this script on the checkout page. | |
if ( ! pmpro_is_checkout() ) { | |
return; |
View cc-pmpro-admin-email-cancel.php
This file contains 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 | |
/** | |
* CC an email address on the 'cancel_admin' email PMPro sends out. | |
* Add this code to your site by following - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_email_headers_admin_cancel_emails($headers, $email) { | |
//cc emails already going to admin_email | |
if( $email->template == 'cancel_admin' ) { | |
//add cc | |
$headers[] = 'CC:' . 'otheremail@domain.com'; // type in your email address here please. |
View pmpro-stripe-webhook-order-time-change.php
This file contains 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 | |
/** | |
* Adjusts the orders date to line up with the date of the webhook transaction received from Stripe. | |
* For further assistance, please reach out to a local WordPress developer or tweak it for your needs. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_update_recurring_order_time( $order ) { | |
$order->timestamp = current_time( 'timestamp' ); | |
$order->datetime = date( "Y-m-d H:i:s", $order->timestamp ); | |
$order->saveOrder(); |
NewerOlder