Created
September 7, 2021 03:57
-
-
Save WillBrubaker/d7727179e7c083aed1bb78a63ec4adde to your computer and use it in GitHub Desktop.
Send custom price to WooCommerce Google Listings and Ads
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
// not sure what to do with this code snippet? See https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ | |
// BTC Donations to: bc1qc2s60yct2aqza4r7ryweheepd8xa8wqpfgdhg3 | |
/** | |
* Send Custom Price to WooCommerce Google Listings and Ads | |
*/ | |
add_filter( 'woocommerce_gla_product_attribute_value_price', 'handsome_bearded_guy_custom_gla_price' ); | |
function handsome_bearded_guy_custom_gla_price( $price ) { | |
return ( $price * .9 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment