Skip to content

2021-06-09 add setting filters#61

Merged
vyskoczilova merged 2 commits into
vyskoczilova:masterfrom
otao-github:ot-settings-filters
Jul 30, 2021
Merged

2021-06-09 add setting filters#61
vyskoczilova merged 2 commits into
vyskoczilova:masterfrom
otao-github:ot-settings-filters

Conversation

@otao-github
Copy link
Copy Markdown
Contributor

if woocommerce official no offer a 'inherit' tax class opcion, give us a hook to return dynamic $settings['pay4pay_includes_taxes'].

@vyskoczilova
Copy link
Copy Markdown
Owner

@otao-github Thanks for the pull request, but I still don't quite understand, why you need to hack the tax settings this way...

What is the use case? How you reproduce not having an "inherit" tax option?

I just don't get it I would like to understand the way you think you need that filter in my plugin. What does the ot_get_customer_tax_class function in the example at https://wordpress.org/support/topic/payment-fee-tax-class-based-on-product-tax-class-2/#post-14536763 do?

@otao-github
Copy link
Copy Markdown
Contributor Author

@otao-github Thanks for the pull request, but I still don't quite understand, why you need to hack the tax settings this way...

What is the use case? How you reproduce not having an "inherit" tax option?

I just don't get it I would like to understand the way you think you need that filter in my plugin. What does the ot_get_customer_tax_class function in the example at https://wordpress.org/support/topic/payment-fee-tax-class-based-on-product-tax-class-2/#post-14536763 do?

ot_get_customer_tax_class() return user tax class by user meta 'ot_tax_class'.
product and cost tax by client role, there are 21% for standard company, 21%+5.2% for client autonomus, 0% for company european in my case.

@otao-github
Copy link
Copy Markdown
Contributor Author

@otao-github Thanks for the pull request, but I still don't quite understand, why you need to hack the tax settings this way...

What is the use case? How you reproduce not having an "inherit" tax option?

I just don't get it I would like to understand the way you think you need that filter in my plugin. What does the ot_get_customer_tax_class function in the example at https://wordpress.org/support/topic/payment-fee-tax-class-based-on-product-tax-class-2/#post-14536763 do?
eg_cod_cost = 2; // fixed
by 'inherit' option, hook get gateway settings and dynamic calculate tax final
tax_standard = 2 * 21%
tax_autonomus = 2 * (21+5.2)%
tax_european = 2 * 0%

@vyskoczilova vyskoczilova merged commit 8472fc3 into vyskoczilova:master Jul 30, 2021
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

Successfully merging this pull request may close these issues.

2 participants