6069df3c by Jeff Balicki

ddd

1 parent b0453505
......@@ -20,7 +20,7 @@ add_filter( 'cf7_2_post_status_wpsl_stores', 'publish_new_wpsl_stores',10,3);
$email = $submitted_data['your-email'];
$subject = 'WYN Important Registration Information';
$message = file_get_contents('https://fp-canada.gotenzing.com/wp-content/themes/understrap-child/inc/Registration-Confirmation.html');
$message = file_get_contents(get_site_url().'/wp-content/themes/understrap-child/inc/Registration-Confirmation.html');
$headers_customer = array('Content-Type: text/html; charset=UTF-8');
wp_mail( $email , $subject, $message, $headers_customer);
......@@ -32,15 +32,19 @@ add_filter( 'cf7_2_post_status_wpsl_stores', 'publish_new_wpsl_stores',10,3);
add_action('publish_wpsl_stores','send_notification_for_publish_project',10,1);
function send_notification_for_publish_project( $post_id ) {
function send_notification_for_publish_project( $post_id ) {
$notification_sent = get_post_meta($post_id, 'notification_sent_for_publish_project', true);
if(!$notification_sent){
update_post_meta($post_id, 'notification_sent_for_publish_project', true);
update_post_meta($post_id, 'wpsl_country', 'CA');
delete_autoload_map_transient();
$email = get_post_meta($post_id, 'wpsl_email', true);
$subject = 'WYN Registration Aproved';
$message = file_get_contents('https://fp-canada.gotenzing.com/wp-content/themes/understrap-child/inc/Registration-Acceptance.html');
$message = file_get_contents(get_site_url().'/wp-content/themes/understrap-child/inc/Registration-Acceptance.html');
$headers_customer = array('Content-Type: text/html; charset=UTF-8');
wp_mail( $email , $subject, $message, $headers_customer);
}
}
......@@ -48,11 +52,14 @@ add_filter( 'cf7_2_post_status_wpsl_stores', 'publish_new_wpsl_stores',10,3);
add_action( 'trash_wpsl_stores', 'send_notification_for_delete_project' ,10,1);
function send_notification_for_delete_project( $post_id ) {
$notification_sent = get_post_meta($post_id, 'notification_sent_for_delete_project', true);
if(!$notification_sent){
update_post_meta($post_id, 'notification_sent_for_delete_project', true);
$email = get_post_meta($post_id, 'wpsl_email', true);
$subject = 'WYN Registration Denied';
$message = file_get_contents('https://fp-canada.gotenzing.com/wp-content/themes/understrap-child/inc/Registration-Denied.html');
$message = file_get_contents(get_site_url().'wp-content/themes/understrap-child/inc/Registration-Denied.html');
$headers_customer = array('Content-Type: text/html; charset=UTF-8');
wp_mail( $email , $subject, $message, $headers_customer);
}
}
\ No newline at end of file
......