Skip to content

Instantly share code, notes, and snippets.

View travislima's full-sized avatar

Travis Lima travislima

View GitHub Profile
@travislima
travislima / my_pmpro_add_addtional_field_to_register_helper.php
Last active February 6, 2020 11:15 — forked from MaryOJob/my_pmpro_add_addtional_field_to_register_helper.php
Already have Register Helper Fields Created and want to Add more fields to it - Use this script to Add to existing Customization
<?php
/**
* Requires Paid Memberships Pro and the PMPro Register Helper Add On(https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/) to be installed and activated in order to work
* Please only add this script if you have previously added a custom field to your Register Helper and you need to add another field.
*/
$fields[] = new PMProRH_Field(
'field_name', // input name, will also be used as meta key
'text', // type of field
@travislima
travislima / my_pmpro_sponsored_members_charge_recievers.php
Last active April 3, 2021 04:01 — forked from MaryOJob/my_pmpro_sponsored_members_charge_recievers.php
Allows sponsored recipients to individually pay for the seats given by their sponsored giver.
<?php
/*
* This codes requires you to have the PMPro Sponsored/Group Members Add On - https://www.paidmembershipspro.com/add-ons/pmpro-sponsored-members/
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* This code recipe is an example that allows membership level 2 to purchase 5 group membership accounts for membership level 3.
* However, level 3 members will need to individualy pay an initial payment of $20 for their membership accounts.
*/
global $pmprosm_sponsored_account_levels;
@travislima
travislima / sws-fncy-woo-post.html
Created October 30, 2019 11:11
Sitewide Sale - Fancy Coupon Template - Woocommerce - Post-Sale Demo Content
<!--
* Demo Content for Sitewide Sales(https://sitewidesales.com/) Landing Pages.
* Fancy Coupon Template - WooCommerce.
* Post-Sales Content Section.
* Make changes to the html as needed. Only edit the content between the html tags.
* Copy the code below and add it to the Post-sale section of your Woocommerce (Fancy Coupon template) sale.
-->
<h1>The Sale has ended!</h1>
<h3>Sorry, this sale has ended. Look out for more fancy sales coming soon.</h3>
@travislima
travislima / sws-fncy-pmpro-post.html
Last active October 30, 2019 11:10
Sitewide Sale - Fancy Coupon Template - Paid Memberships Pro - Post-Sale Demo Content
<!--
* Demo Content for Sitewide Sales(https://sitewidesales.com/) Landing Pages.
* Fancy Coupon Template - Paid Memberships Pro.
* Post-Sales Content Section.
* Make changes to the html as needed. Only edit the content between the html tags.
* Copy the code below and add it to the Post-sale section of your Paid Memberships Pro (Fancy Coupon template) sale.
-->
<h1>The Sale has ended!</h1>
<h3>Sorry, this sale has ended. Look out for more fancy sales coming soon.</h3>
@travislima
travislima / sws-fncy-pmpro-sale.html
Created October 30, 2019 10:50
Sitewide Sales - Fancy Coupon Template - Paid Memberships Pro - Sale Demo Content
<!--
* Demo Content for Sitewide Sales(https://sitewidesales.com/) Landing Pages.
* Fancy Coupon Template - Paid Memberships Pro.
* Sale Content Section.
* Make changes to the html as needed. Only edit the content between the html tags.
* Code includes the WPaid Memberships Pro Checkout page shortcode.
* Copy the code below and add it to the Sale section of your Paid Memberships Pro (Fancy Coupon template) sale.
-->
<h1>Fancy Coupon Sale On Now!</h1>
@travislima
travislima / sws-fncy-woo-sale.html
Last active October 30, 2019 11:07
Sitewide Sales - Fancy Coupon Template - WooCommerce - Sale Demo Content
<!--
* Demo Content for Sitewide Sales(https://sitewidesales.com/) Landing Pages.
* Fancy Coupon Template - WooCommerce.
* Sale Content Section.
* Make changes to the html as needed. Only edit the content between the html tags.
* Code includes the WooCommerce Featured Products shortcode.
* Copy the code below and add it to the Sale section of your WooCommerce (Fancy Coupon template) sale.
-->
<h1>Fancy Coupon Sale On Now!</h1>
@travislima
travislima / sws-fncy-pmpro-pre.html
Created October 30, 2019 10:42
Sitewide Sales - Fancy Coupon Template - Paid Memberships Pro - Pre-Sales Demo Content
<!--
* Demo Content for Sitewide Sales(https://sitewidesales.com/) Landing Pages.
* Fancy Coupon Template - Paid Memberships Pro.
* Pre-Sales Content Section.
* Make changes to the html as needed. Only edit the content between the html tags.
* Copy the code below and add it to the Pre-sale section of your Paid Memberships Pro (Fancy Coupon template) sale.
-->
<h1>Sale Coming Soon!</h1>
<h3>Get ready for the best sale ever. Coming January 2230!</h3>
@travislima
travislima / sws-fncy-woo-pre.html
Last active October 30, 2019 11:08
Sitewide Sales - Fancy Coupon Template - WooCommerce - Pre-Sale Demo Content
<!--
* Demo Content for Sitewide Sales(https://sitewidesales.com/) Landing Pages.
* Fancy Coupon Template - WooCommerce.
* Pre-Sales Content Section.
* Make changes to the html as needed. Only edit the content between the html tags.
* Copy the code below and add it to the Pre-sale section of your WooCommerce (Fancy Coupon template) sale.
-->
<h1>Sale Coming Soon!</h1>
<h3>Get ready for the best sale ever. Coming January 2230!</h3>
@travislima
travislima / show_member_number_on_card.php
Last active April 4, 2021 03:26 — forked from andrewlimaza/show_member_number_on_card.php
Display the Unique Member Number on Membership Card Add On Paid Memberships Pro
<?php
/**
* This will show a member number on the membership card for Paid Memberships Pro. Please read all comments below!
* This requires the following - https://www.paidmembershipspro.com/generate-a-unique-member-number-for-display-on-membership-account-confirmation-email-and-more/
* At the time of this writing, created a custom page template and added in hook "do_action( 'pmpro_membership_card_additional_fields', $pmpro_membership_card_user );" to the relevant area.
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
* Reach out to the PMPro Support team for help with this code recipe - https://www.paidmembershipspro.com/support/
*/
@travislima
travislima / pmpro-member-number-csv.php
Last active April 4, 2021 03:26 — forked from greathmaster/pmpro-member-number-csv.php
Show member number in Members List and Members List CSV export.
<?php
/**
* Show member number in Members List and Members List CSV export.
* Useful for offering multiple pricing structures for membership (i.e. Monthly, Annually).
* Requires the PMPro Member Unique Number Code Recipe - https://www.paidmembershipspro.com/generate-a-unique-member-number-for-display-on-membership-account-confirmation-email-and-more/
* Add this code below to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_members_list_csv_extra_columns($columns)