View my_sws_apply_sitewide_sales_discount_to_live_price.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 | |
/** | |
* Sitewide Sales compatibility with RightPress Product Prices - Live Update. | |
*/ | |
function my_sws_apply_sitewide_sales_discount_to_live_price($price, $product) { | |
// Return early if Sitewide Sales is not active. | |
if ( ! defined ( 'SWSALES_VERSION' ) ) { | |
return $price; | |
} |
View pmpro-tag-delete-inactive-users.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 | |
/** | |
* Script to locate, tag, export, then delete inactive users in your Paid Memberships Pro / WordPress website. | |
* | |
* Once this snippet is in the site, admins can run the process by visiting /?delete_inactive_users=1 in the WordPress admin. | |
* Always back up user data before running any bulk delete script and remove this code after the process is done. | |
*/ | |
function my_pmpro_tag_inactive_users() { | |
if ( ! defined( 'PMPRO_VERSION' ) ) { | |
exit; |
View my_pmpro_has_membership_access_on_date.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 | |
/** | |
* Filter to only allow access to a protected post by post ID after a specific calendar date. | |
*/ | |
function my_pmpro_has_membership_access_on_date( $hasaccess, $post, $user ) { | |
// If they already don't have access, return. | |
if ( ! $hasaccess ) { | |
return $hasaccess; | |
} |
View my-custom-page-template.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 | |
/** | |
* Template Name: My Custom Template | |
* | |
* An example template that uses the pmpro_has_membership_access function to protect content. | |
* | |
*/ | |
get_header(); ?> |
View add-credit-card-image-to-checkout.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 | |
/** | |
* Display credit card logos before the submit button on the Paid Memberships Pro Membership Checkout page. | |
* | |
* Download the icons from https://www.paidmembershipspro.com/add-credit-card-and-paypal-logos-to-checkout/ | |
* Place the image file in the correct location according to your customizations structure. | |
*/ | |
function pmpro_add_my_logos_to_checkout(){ | |
global $pmpro_level; |
View export_woocommerce_subscription_user_data.txt
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
SELECT | |
p.ID as 'Subscription ID', | |
pm1.meta_value as 'User ID', | |
oitems.order_item_name as 'Product', | |
pm2.meta_value as 'Next Payment Date' | |
FROM wp_posts p | |
INNER JOIN wp_postmeta pm1 ON pm1.post_id = p.ID | |
INNER JOIN wp_postmeta pm2 ON pm2.post_id = p.ID | |
INNER JOIN wp_woocommerce_order_items oitems ON oitems.order_id = p.ID | |
WHERE |
View common-blocks-theme-unit-test.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
<!-- wp:paragraph --> | |
<p>The Common category includes the following blocks:<em> Paragraph, image, headings, list, gallery, quote, audio, cover, video.</em></p> | |
<!-- /wp:paragraph --> | |
<!-- wp:paragraph --> | |
<p>The paragraph block is the default block type. It should not have any alignment of any kind. It should just flow like you would normally expect. Nothing fancy. Just straight up text, free flowing, with love.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:paragraph --> | |
<p>This paragraph is left aligned.</p> |
NewerOlder