Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonporter007/ef6b08b71dbc4432b6af469aefc557b3 to your computer and use it in GitHub Desktop.
Save simonporter007/ef6b08b71dbc4432b6af469aefc557b3 to your computer and use it in GitHub Desktop.
Facebook for WooCommerce: Hardcode the currency sent to Facebook for all products
<?php //only copy if required
/*
* Set the currency of all products sent to Facebook as e.g. `ZAR`
*/
function sv_facebook_for_woocommerce_integration_prepare_product_set_currency( $product_data ) {
// change the currency below to control all products sent to Facebook
$product_data['currency'] = 'ZAR';
return $product_data;
}
add_filter( 'facebook_for_woocommerce_integration_prepare_product', 'sv_facebook_for_woocommerce_integration_prepare_product_set_currency', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment