is_type( 'variable' ) ) { return 'variable_coordinated'; } // Simple products use static native gallery markup. Preserve zoom/lightbox // metadata while optimizing the display image and its responsive candidates. if ( $product->is_type( 'simple' ) ) { return 'simple_supported'; } return 'native_fallback'; } /** * Whether this product page's gallery is one Image Manager may change (a simple gallery or a coordinated classic * variable gallery). * * @return bool True when its pictures may be delivered. */ public static function allow_product_attachment(): bool { return in_array( self::woo_product_image_mode(), array( 'simple_supported', 'variable_coordinated' ), true ); } /** Public, descriptive support matrix. It contains no site or customer data. */ public static function matrix(): array { return array( 'wordpress_attachment_html' => 'supported', 'wordpress_content_images' => 'supported_when_native_markup_is_safe', 'active_theme_observed_images' => 'supported_when_indexed_and_native_markup_is_safe', 'woocommerce_simple_product_gallery' => 'supported', 'woocommerce_variable_product_gallery' => 'classic_gallery_with_native_attribute_coordination', 'woocommerce_block_or_custom_gallery' => 'native_fallback_unless_owner_integrates', 'woocommerce_gallery_zoom_source' => 'native_original_preserved', 'existing_picture_or_scripted_lazy_markup' => 'native_fallback', 'protected_or_unknown_offload' => 'native_fallback', ); } }