Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with wpallimport: not saving price with tax to Facebook during import #174

Closed
alexanderdejong opened this issue Nov 30, 2017 · 5 comments

Comments

@alexanderdejong
Copy link

The plugin saves the price incl tax only when I create a new post or edit it.

However, it is not pushing the tax price to Facebook when using the plugin wpallimport to import the products. Is there a way I can hook into function update_product_item and force update it? I've not worked much with classes before. So I was trying to force update it using the hook pmxi_saved_post from wpallimport:

add_action('pmxi_saved_post', 'facebook_for_woocommerce_saved_post_action', 10, 1);
function facebook_for_woocommerce_saved_post_action($id) {
	
	$fb_product_group_id = get_post_meta( get_the_ID(), 'fb_product_group_id' ); 
	$fb_product_item_id = get_post_meta( get_the_ID(), 'fb_product_item_id' ); 
	$woo_product = $id;

    $PostType = get_post_type($id);
	
	// Only run if product post type
    if ( $PostType=='product' ){
		
		$facebook = new WC_Facebookcommerce_Integration();
		$facebook->update_product_item($woo_product, $fb_product_item_id);
	
    }
	
}
@jieminz22
Copy link

Hi,

Have you tried with an earlier version?

@mengyingdu
Copy link
Contributor

Hi @alexanderdejong ,

In order to set up tax in Woo:
WooCommerce --> Settings --> Enable taxes and tax calculations (under 'general' tab) --> set up tax config under 'tax' tab
tax tab only appear after enable tax in general step
Also, there is detailed doc and video to explain how to set up tax step by step:
https://docs.woocommerce.com/document/setting-up-taxes-in-woocommerce/

After set up this, your price at Facebook Shop will be the price included in your imported csv file plus the tax rate you set in WooCommerce.

Thanks.

@alexanderdejong
Copy link
Author

Hi @mengyingdu ,

Taxes are already setup and working normal in my shop. So when I press sync the product on Facebook receives the price without tax. However, when I click update product on each product page it updates the price on Facebook.

@jieminz22 I will be trying earlier versions this weekend. Also to check #173.

@mengyingdu mengyingdu added bug and removed question labels Dec 3, 2017
@mengyingdu mengyingdu changed the title Not saving price with tax to Facebook during import Compatibility with wpallimport: not saving price with tax to Facebook during import Dec 3, 2017
@dmitridr
Copy link
Contributor

I'm following up on older issues. Our plugin isn't compatible with WP All Import yet so not surprising that we have this kind of problem, we have several open issues on this. #312 #32 There may be workarounds there you can use.

@mengyingdu
Copy link
Contributor

Hi @alexanderdejong ,

We added preliminary compatibility support for WP All Import in v1.8.6.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants