2019-09-10 06:27:33 +02:00
|
|
|
<?php
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit; // Exit if accessed directly
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-02-21 05:13:46 +01:00
|
|
|
* @class OpalEstate_Send_Email_Request_Reviewing
|
2019-09-10 06:27:33 +02:00
|
|
|
*
|
|
|
|
* @version 1.0
|
|
|
|
*/
|
|
|
|
class OpalEstate_Send_Email_Request_Reviewing extends OpalEstate_Abstract_Email_Template {
|
2019-09-20 12:36:01 +02:00
|
|
|
|
2019-09-10 06:27:33 +02:00
|
|
|
/**
|
|
|
|
* Send Email
|
|
|
|
*/
|
2019-09-20 12:36:01 +02:00
|
|
|
public function get_subject() {
|
2019-10-21 08:24:14 +02:00
|
|
|
$content = esc_html__( 'You have a message request reviewing', 'opalestate-pro' );
|
2019-09-30 11:28:04 +02:00
|
|
|
$content = opalestate_options( 'request_review_email_subject', $content );
|
|
|
|
|
|
|
|
return $content;
|
2019-09-10 06:27:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Send Email
|
|
|
|
*/
|
|
|
|
public function get_content_template() {
|
2019-09-30 11:28:04 +02:00
|
|
|
$content = opalestate_options( 'request_review_email_body', self::get_default_template() );
|
2019-10-21 08:24:14 +02:00
|
|
|
|
2019-09-30 11:28:04 +02:00
|
|
|
return $content;
|
2019-09-20 12:36:01 +02:00
|
|
|
}
|
2019-09-10 06:27:33 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send Email
|
|
|
|
*/
|
2019-09-20 12:36:01 +02:00
|
|
|
public function to_email() {
|
2019-09-10 06:27:33 +02:00
|
|
|
return $this->args ['receiver_email'];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Send Email
|
|
|
|
*/
|
2019-09-20 12:36:01 +02:00
|
|
|
public function cc_email() {
|
2019-09-10 06:27:33 +02:00
|
|
|
return $this->args ['sender_email'];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Send Email
|
|
|
|
*/
|
|
|
|
public function get_body() {
|
2019-09-20 12:36:01 +02:00
|
|
|
$post = get_post( $this->args['post_id'] );
|
|
|
|
|
2019-10-21 08:24:14 +02:00
|
|
|
// $this->args['email'] = $this->args['receiver_email'];
|
2019-09-20 12:36:01 +02:00
|
|
|
$this->args['property_link'] = get_permalink( $post->ID );
|
|
|
|
$this->args['property_name'] = $post->post_title;
|
2019-09-10 06:27:33 +02:00
|
|
|
|
|
|
|
return parent::get_body();
|
|
|
|
}
|
2019-09-30 11:28:04 +02:00
|
|
|
|
|
|
|
public static function get_default_template() {
|
|
|
|
return opalestate_load_template_path( 'emails/request-reviewing' );
|
|
|
|
}
|
2019-09-10 06:27:33 +02:00
|
|
|
}
|