$product ) { $counterText = $edCounter ? ( $index + 1 ) : ''; $ribbonText = $product['ribbon'] ?? ''; $imageId = $product['imageId'] ?? ''; $imageUrl = esc_url( do_shortcode( $product['imageUrl'] ?? '' ) ); $imageAlt = esc_attr( $product['imageAlt'] ?? '' ); $featuresList = $product['featuresList'] ?? array(); if ( is_array( $featuresList ) && count( $featuresList ) > 0 && isset( $featuresList[0]['list'] ) && is_string( $featuresList[0]['list'] ) && has_shortcode( $featuresList[0]['list'], 'affiliatex-product' ) ) { $featuresList = json_decode( do_shortcode( $featuresList[0]['list'] ), true ); } switch ( $layoutStyle ) { case 'layoutOne': include 'product-table/layout-1.php'; break; case 'layoutTwo': include 'product-table/layout-2.php'; break; case 'layoutThree': include 'product-table/layout-3.php'; break; } } $table_body = ob_get_clean(); ?>