__('Tabela znakowaƄ', 'pandaGadzety'), 'priority' => 50, 'callback' => [$this, 'customTabData'] ); return $tabs; } function customTabData() { global $product; \wp_enqueue_style("labelingStyle", plugins_url("/pandaGadzety/assets/css/labeling.css")); $sku = $product->get_sku(); $product_repository = new Repository\ProductRepository(SERVER_URL); $results = $product_repository->getLabelingInfo($sku); // The new tab content $html = "
"; $html .= ""; foreach ($results as $data) { $html .= $this->get_labeling_block($data['image'], $data['technology'], $data['name']); } $html .= "
"; $html .= "
"; echo $html; } public function get_labeling_block($img, $technology, $position) { $html = ""; $html .= ""; $html .= ""; $html .= "Technologia: ". $technology."
"; $html .= "Pozycja: ". $position.""; $html .= ""; $html .= ""; // $html = "
"; // $html .= "
"; // $html .= "
"; // $html .= "

Technologia: ". $technology."

"; // $html .= "
"; // $html .= "
"; return $html; } }