Last active
December 1, 2022 22:27
-
-
Save simonporter007/ef6b08b71dbc4432b6af469aefc557b3 to your computer and use it in GitHub Desktop.
Facebook for WooCommerce: Hardcode the currency sent to Facebook for all products
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
<?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