Created
June 7, 2021 10:56
-
-
Save mitchellkrogza/a8f8ea84303bb445678b5f835518be85 to your computer and use it in GitHub Desktop.
Add Product Brand to All Products (WooCommerce)
This file contains 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
// Add Brand for Products. | |
// Only use if you sell one brand of item ie. Your own brand | |
add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) { | |
$entity['brand'] = 'My Brand' ; | |
return $entity; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment