vyskoczilova / woocommerce-payforpayment

WordPress plugin WooCommerce Pay for Payment
13 stars 11 forks source link

2021-06-09 add setting filters #61

Closed otao-github closed 3 years ago

otao-github commented 3 years ago

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

vyskoczilova commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

@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%