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
var wpgmza_open_cat = wpgmza_getUrlVars()["catid"]; | |
jQuery(document).ready(function(){ | |
if( jQuery('.wpgmza_checkbox').length > 0 && typeof wpgmza_open_cat !== 'undefined' ){ | |
setTimeout(function(){ | |
jQuery("#wpgmza_cat_checkbox_"+wpgmza_open_cat).click(); | |
}, 800); | |
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
google.maps.event.addListener(infoWindow[wpmgza_marker_id],'closeclick',function(){ | |
MYMAP[map_id].map.setZoom(parseInt(wpgmaps_localize[map_id]['map_start_zoom'])); | |
}); |
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
<div id='inpage_wplc_chat'></div> |
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
var valid = 0; | |
jQuery.each( jQuery("#wpcf_nd .text-input, #wpcf_nd .text-area"), function(){ | |
if( jQuery(this).val() === "" ){ | |
jQuery(this).css("border", "1px solid red"); | |
valid++; | |
} | |
}); |
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
/* | |
Test Stripe webhook events | |
Add to a custom plugin, then visit /?teststripe=1 | |
*/ | |
function init_test_stripe() { | |
if(!empty($_REQUEST['teststripe'])) { | |
$_REQUEST['event_id'] = 'evt_9ktqwT5xFlKNOp'; //EDIT THIS to be the ID of an actual recurring payment event in your account | |
require_once(PMPRO_DIR . "/services/stripe-webhook.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 | |
/** | |
* Based on the Register Helper example. | |
* We've added a "buddypress" option for each field | |
* set to the XProfile name we used when setting up | |
* the fields in the BuddyPress extended profile. | |
* If the PMPro BuddyPress Add On is activated | |
* then the fields will be synchronized. | |
* Register Helper: https://www.paidmembershipspro.com/add-ons/pmpro-register-helper-add-checkout-and-profile-fields/ | |
* PMPro BuddyPress: https://www.paidmembershipspro.com/add-ons/buddypress-integration/ |
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 | |
/** | |
* Render the extra profile fields on the backend | |
*/ | |
function extra_user_profile_fields( $user ) { ?> | |
<h3><?php _e("Extra profile information", "blank"); ?></h3> | |
<table class="form-table"> | |
<tr> | |
<th><label for="external_username"><?php _e("External Username"); ?></label></th> |
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 | |
/** | |
* Remove user data manually by adjusting the ID's in the array, or adding them into a | |
* query param by setting it to /?reset_test_accounts=true&accounts=2,3 | |
* This works well if you've deleted the user accounts already and want to remove the | |
* first few users you'd initially tested with | |
*/ | |
function pmpro_remove_test_accounts( $user_id = null ){ | |
if( isset( $_REQUEST['reset_test_accounts'] ) && $_REQUEST['reset_test_accounts'] == 'true' ){ |
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 | |
function my_pmpro_mailchimp_listsubscribe_fields($fields, $user){ | |
if( isset( $_REQUEST['discount_code'] ) && $_REQUEST['discount_code'] !== "" ){ | |
$new_fields = array( | |
"DISCOUNTC" => $_REQUEST['discount_code'], | |
); | |
$fields = array_merge($fields, $new_fields); |
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
UPDATE wp_pmpro_memberships_users SET enddate = "0000-00-00 00:00:00" WHERE membership_id = 15 AND status = "active" |