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_wappo_redirect_appointment_confirmed() | |
{ | |
echo '<script>'; | |
echo "document.addEventListener('wappo_confirmed', function (e) { | |
window.location.replace('https://mysite.com/mythankyoupage'); | |
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 | |
add_action('wappointment_appointment_confirmed', 'my_function'); | |
function my_function($eventObject){ | |
$client = $eventObject->getClient(); | |
$email = $client->email; | |
$name = $client->name; |
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 | |
add_filter('wappointment_admin_email_head_image', 'my_wappointment_admin_email_head_image', 10, 1); | |
function my_wappointment_admin_email_head_image($value){ | |
return 'https://www.google.com/images/branding/googlelogo/2x/googlelogo_light_color_272x92dp.png'; | |
} | |
add_filter('wappointment_admin_email_head_link', 'my_wappointment_admin_email_head_link', 10, 1); |
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 | |
add_action('wappointment_appointment_confirmed', 'my_function'); | |
function my_function($eventObject){ | |
$client = $eventObject->getClient(); | |
$email = $client->email; | |
$name = $client->name; | |
/* | |
your code | |
*/ |
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_wappo_analytics_appointment_confirmed() | |
{ | |
echo '<script async src="https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID"></script>'; | |
echo "<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){window.dataLayer.push(arguments);} | |
gtag('js', new Date()); |
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
// Return 1 if a > b | |
// Return -1 if a < b | |
// Return 0 if a == b | |
function version_compare(a, b) | |
{ | |
if (a === b) | |
{ | |
return 0; | |
} |
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 | |
/** | |
* | |
* @param string $tag_value | |
* @param int $user_id mailpoet's subscriber id | |
* @return type | |
*/ | |
function mailpoet_shortcodes_custom_filter( $tag_value , $user_id ) { | |
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 to return an undo unsbscribe string for MailPoet newsletters | |
* you could place it in the functions.php of your theme | |
* @return string | |
*/ | |
function mpoet_get_undo_unsubscribe(){ | |
if(class_exists('WYSIJA') && !empty($_REQUEST['wysija-key'])){ | |
$undo_paramsurl = array( |
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
/** | |
* This is a sample function showing how to get a link toward the "Manage your subscriptions page" in Wysija (http://wordpress.org/plugins/wysija-newsletters/description/) | |
* You'll need to call that function at a moment where Wysija's classes are already loaded otherwise it won't work | |
* @return subscription link for the current logged in WordPress' user | |
*/ | |
function wysija_get_subscriptions_edit_link(){ | |
// wysija classes ar enot loaded so we can't use that function | |
if (!class_exists('WYSIJA')){ | |
return; | |
} |