Last active
February 17, 2022 05:05
-
-
Save wtmujeebu/098b8af40d58b34606869e06d29be503 to your computer and use it in GitHub Desktop.
Modify FB retailed ID of the product before syncing - using Product Catalog Sync for WooCommerce by WebToffee
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 // Do not copy this line. | |
add_filter('wt_fb_sync_product_retailer_id', 'wt_fb_sync_product_retailer_id', 10, 2); | |
function wt_fb_sync_product_retailer_id($fb_retailer_id, $product) { | |
$fb_retailer_id = $product->get_sku() ? $product->get_sku() : 'wc_post_id_' . $product->get_id(); | |
return $fb_retailer_id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment