How to Require a maximum and minimum Image Dimension for Uploading Woocommerce products?

I am using the below code to restrict vendors from uploading images under specific dimensions. 533px X 533px but i want this happen only for woocommerce products not all images they uploads .. Right now i am using this code add_action( ‘admin_init’, ‘wpse_28359_block_authors_from_uploading_small_images’ ); function wpse_28359_block_authors_from_uploading_small_images() { if( !current_user_can( ‘administrator’) ) add_filter( ‘wp_handle_upload_prefilter’, ‘wpse_28359_block_small_images_upload’ );…

Set post title based on custom field with new (Gutenberg) editor

With the old WordPress editor it was possible to set a custom post’s title to a custom valued based on another custom field by using the wp_insert_post_data filter. This is described here for instance: https://wordpress.stackexchange.com/a/198268/26545 However, with the new Gutenberg editor, this doesn’t work anymore (at least for me). I have read that the Gutenberg…