Automattic\WooCommerce\Admin\Features

NewProductManagementExperience{}WC 1.0

Loads assets related to the new product management experience page.

Хуки из класса

Использование

$NewProductManagementExperience = new NewProductManagementExperience();
// use class methods

Методы

  1. public __construct()
  2. public enqueue_styles()

Код NewProductManagementExperience{} WC 7.3.0

class NewProductManagementExperience {

	/**
	 * Constructor
	 */
	public function __construct() {
		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
	}

	/**
	 * Enqueue styles needed for the rich text editor.
	 */
	public function enqueue_styles() {
		if ( ! PageController::is_admin_or_embed_page() ) {
			return;
		}
		wp_enqueue_style( 'wp-edit-blocks' );
		wp_enqueue_style( 'wp-format-library' );
		wp_enqueue_editor();
		/**
		 * Enqueue any block editor related assets.
		 *
		 * @since 7.1.0
		*/
		do_action( 'enqueue_block_editor_assets' );
	}

}