Skip to content

Instantly share code, notes, and snippets.

@rwsite
Created November 24, 2021 18:49
Show Gist options
  • Save rwsite/e84053cd8f51cd980ad05df22b6b3471 to your computer and use it in GitHub Desktop.
Save rwsite/e84053cd8f51cd980ad05df22b6b3471 to your computer and use it in GitHub Desktop.
add_filter('wc_iiko_product', function (ProductArg $data, \iiko\classes\Product $iiko_product ){
if(!empty($iiko_product->tags) && false !== strpos($iiko_product->tags, 'Избранные' )) {
$data->featured = true;
}
return $data;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment