product = $product; $this->config = $config; $this->storeSettings = new StoreSettings(); } public function render() { ?> storeSettings->get('show_relevant_product_in_modal') == 'yes'; $showRelevant = apply_filters( 'fluent_cart/product_modal/show_relevant_products', $showRelevant, $this->product->ID ); if (!$showRelevant) { return; } $products = ShopResource::getSimilarProducts($this->product->ID, false); if (empty($products)) { return; } (new ProductListRenderer( $products, __('Related Products', 'fluent-cart'), 'fct-similar-product-list-container', ['rating_context' => 'relevant'] ))->render(); } }