Created
December 9, 2017 07:02
-
-
Save kreamweb/052456c878b9a5b3e6e6df8c225538fe to your computer and use it in GitHub Desktop.
Add sku in ajax search results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('yith_wcas_suggestion', 'yith_wcas_suggestion', 10, 2); | |
function yith_wcas_suggestion( $suggestion, $product ){ | |
$sku = $product->get_sku(); | |
if( ! empty( $sku ) ){ | |
$suggestion['sku'] = '<span class="sku">SKU: '. $product->get_sku().'</span>'; | |
} | |
return $suggestion; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment