MailPoet\EmailEditor\Engine
Email_Editor::extend_email_post_api()
Extends the email post types with email specific data.
Method of the class: Email_Editor{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Email_Editor = new Email_Editor(); $Email_Editor->extend_email_post_api();
Email_Editor::extend_email_post_api() Email Editor::extend email post api code WC 9.8.1
public function extend_email_post_api() { $email_post_types = array_column( $this->get_post_types(), 'name' ); register_rest_field( $email_post_types, 'email_data', array( 'get_callback' => array( $this->email_api_controller, 'get_email_data' ), 'update_callback' => array( $this->email_api_controller, 'save_email_data' ), 'schema' => $this->email_api_controller->get_email_data_schema(), ) ); }