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 | |
/** | |
* 1. Adds 20% tax text to the level cost text. | |
* 2. Adds 20% tax to invoice if checking out as UK customer. | |
* 3. Adds 20% tax if UK to checkout and invoice. | |
* | |
* 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 | |
/** | |
* This recipe assigns the readonly attribute to the fields | |
* first_name and last_name on the PMPro profile edit page | |
* on the front-end and the user profile page in the | |
* WordPress dashboard (back-end) | |
* | |
* 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. |
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 | |
/* | |
* Remove required * from some billing fields and then hide these fields with CSS | |
* Add this to your PMPro Customization Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
add_action( 'pmpro_required_billing_fields', 'my_pmpro_required_billing_fields' ); | |
function my_pmpro_required_billing_fields( $fields ) { | |
if ( is_array( $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
<?php | |
/** | |
* Shows local avatar on the front-end and doesn't allow on in the admin. | |
* | |
* 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 a "Renewal" column to the Orders list and order CSV export | |
* to show if the order is a membership renewal. | |
*/ | |
function my_pmpro_is_order_renewal( $order ) { | |
global $wpdb; |
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
/* | |
Code demo on using pmprosm_children_fields() and pmprosm_after_child_created() hooks to add additional fields to checkout child account creation. | |
Adds shipping fields to child accounts at checkout. Use PMPro Shipping Address on Membership Checkout to view | |
*/ | |
function pmprosm_additional_child_fields($i, $seats) | |
{?><label>Shipping Address 1</label><input type="text" name="add_child_saddress1[]" value="" size="20" /><label>Shipping Address 2</label><input type="text" name="add_child_saddress2[]" value="" size="20" /><label>City</label><input type="text" name="add_child_scity[]" value="" size="20" /><label>State</label><input type="text" name="add_child_sstate[]" value="" size="20" /><label>Postal Code</label><input type="text" name="add_child_szipcode[]" value="" size="20" /><?php | |
} | |
add_action('pmprosm_children_fields', 'pmprosm_additional_child_fields', 10, 2); |
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 | |
/** | |
* Add the following code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
* Move Payment Option fields | |
*/ | |
function pmpro_move_level_options_fields() { | |
global $pmpro_pages; | |
if(is_page($pmpro_pages['checkout'])) { |
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 | |
require_once( get_template_directory() . esc_attr( "/options_divi.php" ) ); | |
global $options; | |
$epanel_key = "name"; | |
$epanel_value = "Show RSS Icon"; | |
$custom_options = array ( | |
array( "name" => esc_html__( "Show GitHub Icon", $themename ), | |
"id" => $shortname."_show_github_icon", |
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 | |
/** | |
* Add the following code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_move_name_fields() { | |
global $pmpro_pages; | |
if(is_page($pmpro_pages['checkout'])) { | |
?> |
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 | |
/** | |
* Change the "IMPORTANT!" confirmation text when using PMPro and the Email Confirmation Add On. | |
* Add this code into a custom plugin or code snippet. | |
* Be sure to change the translated lines below to the language and words you want. | |
* https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/ | |
*/ | |
function my_pmpro_email_confirmation_text( $translated_text, $text, $domain ) { | |
// Ignore strings for other plugins. |