'product-categories', 'hide_empty' => false, 'orderby' => 'name' )); $options = []; if (!is_wp_error($categories) && !empty($categories)) { foreach ($categories as $category) { $options[$category->term_id] = $category->name; } } return $options; } public static function renderCollectionCard($settings, $post, $post_index = 1, $uid = '') { $content = Frontend::get_content_wrapper($settings, Arr::get($settings, 'fields', []), $post); if ($post_index === 1) { echo "
"; } else { echo "
"; } $linkedProduct = isset($settings['linkProduct']) ? $settings['linkProduct'] : false; if ($linkedProduct && strpos($content, ''; } echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ($linkedProduct && strpos($content, ''; } echo '
'; } }