Automattic\WooCommerce\Internal\EmailEditor
Integration::init
Initialize the integration.
Method of the class: Integration{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Integration = new Integration(); $Integration->init(): void;
Integration::init() Integration::init code WC 10.8.1
final public function init(): void {
if ( ! $this->dependency_check->are_dependencies_met() ) {
// If dependencies are not met, do not initialize the email editor integration.
return;
}
add_action( 'woocommerce_init', array( $this, 'initialize' ) );
// Register the post deletion cleanup hook early and unconditionally so it works in
// both admin and non-admin contexts (e.g. WP-CLI). This only needs $wpdb and the
// posts manager singleton — it must not depend on the full editor init chain.
add_action( 'before_delete_post', array( $this, 'delete_email_template_associated_with_email_editor_post' ), 10, 2 );
}