Skip to content

Instantly share code, notes, and snippets.

@WillBrubaker
Created September 7, 2021 03:57
Show Gist options
  • Save WillBrubaker/d7727179e7c083aed1bb78a63ec4adde to your computer and use it in GitHub Desktop.
Save WillBrubaker/d7727179e7c083aed1bb78a63ec4adde to your computer and use it in GitHub Desktop.
Send custom price to WooCommerce Google Listings and Ads
// 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