Skip to content

Instantly share code, notes, and snippets.

@mburnette
Last active September 21, 2020 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mburnette/97e5de5fb6a300ed5b4f336ee21badec to your computer and use it in GitHub Desktop.
Save mburnette/97e5de5fb6a300ed5b4f336ee21badec to your computer and use it in GitHub Desktop.
[Change checkout URLs to product URLs] Changes checkout URLs to be identical to product URLs #FacebookForWooCommerce
<?php // only copy this line if needed
/**
* Change checkout URLs to product URLs for Facebook products
*/
function sv_fbw_checkout_url_to_product( $product_data, $id ){
$product_data['checkout_url'] = $product_data['url'];
return $product_data;
}
add_filter( 'facebook_for_woocommerce_integration_prepare_product', 'sv_fbw_checkout_url_to_product', 100, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment