Last active
July 17, 2018 13:02
-
-
Save cameronjonesweb/a223df84aec88e8701124955ec29daf0 to your computer and use it in GitHub Desktop.
Updates the Salesforce API endpoint for the Gravity Forms Salesforce Add-On
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 | |
/** | |
* Updates the Salesforce API endpoint for the Gravity Forms Salesforce Add-On | |
* From the article Fixing The Gravity Forms Salesforce Add-On For WordPress: https://cameronjonesweb.com.au/blog/fixing-the-gravity-forms-salesforce-add-on-for-wordpress/ | |
* | |
* @link https://help.salesforce.com/articleView?id=Updating-the-Web-to-Case-and-Web-to-Lead-Endpoint-URL&language=en_US&type=1 | |
* @param string $sub The current subdomain (www or test). | |
* @param bool $test Whether it's in test mode or not. | |
* @return string The new subdomain | |
*/ | |
function cameronjonesweb_salesforce_subdomain( $sub, $test ) { | |
if ( 'www' === $sub ) { | |
$sub = 'webto'; | |
} | |
return $sub; | |
} | |
add_filter( 'gf_salesforce_request_subdomain', 'cameronjonesweb_salesforce_subdomain', 99, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment