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

Financial type set in product not being used during sync to contribution #44

Open
leahcooper opened this issue Jul 15, 2021 · 2 comments

Comments

@leahcooper
Copy link

Hello, I LOVE this plugin and am excited to implement it, but I am encountering a problem with product-specific financial types. I have created multiple products, each with their own civicrm financial type set in the product civicrm tab. But when an order is placed, the contribution record always uses the default financial type that is set in the woocommerce settings.

Also, when I look at the All Products listing, all of the products show the same financial type with "(Default)" listed after. If I edit the product I see the correct financial type, but in the listing it shows the default one.

@leahcooper leahcooper changed the title Financial type set in product not being used Financial type set in product not being used during sync to contribution Jul 15, 2021
@leahcooper
Copy link
Author

I think I've fixed this with the following edits to two include files:

In includes/class-woocommerce-civicrm-products.php:
in function columns_content
on line 115
change constant ‘_civicrm_contribution_type’ to ‘woocommerce_civicrm_financial_type_id’

In includes/class-woocommerce-civicrm-manager.php:
in function add_contribution
on line 611
change constant ‘_civicrm_contribution_type’ to ‘woocommerce_civicrm_financial_type_id’

@alexletizia
Copy link

Thanks @leahcooper , it works.

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

No branches or pull requests

2 participants