get_image_id(); $context = array( 'product_id' => $product->get_id(), 'product_name' => $product->get_name(), 'price_html' => $product->get_price_html(), 'short_description' => $product->get_short_description(), 'image_html' => $image_id ? wp_get_attachment_image( $image_id, array( 100, 100 ), false, array( 'class' => 'composable-header-image' ) ) : '', 'permalink' => get_permalink( $product->get_id() ), 'product_class' => implode( ' ', wc_get_product_class( 'composable-product-layout', $product ) ), 'selector_html' => $selector_html, 'after_summary_html' => $after_summary_html, ); $plugin = \Magdev\WcComposableProduct\Plugin::instance(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output escaped by Twig template. echo $plugin->render_template( 'single-product-composable.html.twig', $context ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- WooCommerce hook. do_action( 'woocommerce_after_single_product' );