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 custom_awp_url($url) { | |
$user_meta = wp_get_current_user(); | |
$user_email = $user_meta->user_email; | |
$url = $url . '?leadsource=' . urlencode($user_email); |
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 | |
// Deletes user meta fields if the data loaded from the CRM is missing or empty | |
function wpf_remove_empty_meta_fields( $user_id, $user_meta ) { | |
$contact_fields = wp_fusion()->settings->get( 'contact_fields' ); | |
foreach ( $contact_fields as $field_id => $field_data ) { |
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_gform_after_submission( $entry, $form ) { | |
// Gets the first name and last name from field ID 3, and email from field ID 4 | |
$contact_data = array( | |
'FirstName' => rgar( $entry, '3.3' ), | |
'LastName' => rgar( $entry, '3.6' ), | |
'Email' => rgar( $entry, '4' ) | |
); |
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 process_file_download() { | |
if( ! isset( $_GET['ifs_download'] ) || empty( $_GET['ifs_download'] ) || ! is_user_logged_in() ) { | |
return; | |
} | |
$file_id = $_GET['ifs_download']; |
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 | |
// Prevents data from syncing to CRM for users with the role "subscriber" | |
function block_updates_by_role( $user_meta, $user_id ) { | |
$user = get_user_by( 'id', $user_id ); | |
if ( in_array( 'subscriber', (array) $user->roles ) ) { | |
return false; |
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 | |
/* | |
Plugin Name: WP Fusion - WooCommerce Coupon Sync | |
Description: Syncs a coupon used at checkout to a custom field on the contact record | |
Plugin URI: https://verygoodplugins.com/ | |
Version: 1.0 | |
Author: Very Good Plugins | |
Author URI: https://verygoodplugins.com/ | |
*/ |
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 | |
// Use first name and lastname as the username | |
function wpf_use_names_as_logins( $user_meta ) { | |
$user_meta['user_login'] = strtolower( $user_meta['first_name'] . $user_meta['last_name'] ); | |
return $user_meta; |
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 add_sf_instance_url( $settings ) { | |
$settings['sf_instance_url'] = array( | |
'title' => 'Instance URL', | |
'desc' => '', | |
'std' => '', | |
'type' => 'text', | |
'section' => 'setup' |
OlderNewer