vendidero / woocommerce-germanized

Adapt WooCommerce to the German Market with Germanized for WooCommerce
https://vendidero.de/woocommerce-germanized
Other
51 stars 41 forks source link

Issue with Polylang for WC #161

Closed sebastienserre closed 2 years ago

sebastienserre commented 2 years ago

Hello,

I'm Sébastien from the Polylang Pro and Polylang for WooCommerce helpdesk. I'm contacting you because we've found a possible bug when your free plugin is used with Polylang for WooCommerce.

Today, I have a request from a common customer with Germanized Pro which say since Polylang WC 1.6.3, she didn't receive any e-mail for a new order.

In Polylang for WC 1.6.3 we added a small compatibility code add_filter( 'woocommerce_germanized_order_email_admin_confirmation_sent', '__return_true' ); to avoid sending twice the "New Order" e-mail to the administrator. We stop sending your emails to send ours, which is translated.

It seems your Pro version block our e-mail and as we block yours, no e-mail is sent ;-)

Could you please contact us to see with our developers how to solve this ?

Regards

dennisnissle commented 2 years ago

Hi there,

Germanized triggers the original Woo email - why don't you use hooks located in WooCommerce to switch the language depending on the email being sent (as WPML does)? This would introduce better compatibility with other plugins.

It seems your Pro version block our e-mail and as we block yours, no e-mail is sent ;-)

No, the pro version does not adjust email handling (except when the manual contract confirmation option is enabled). Germanized prevents the email from being sent (again) on order status updates: https://github.com/vendidero/woocommerce-germanized/blob/master/includes/class-wc-gzd-emails.php#L759 - maybe that's correlated?

You could use the woocommerce_gzd_checkout_order_before_confirmation hook to send a custom order confirmation instead of the one Germanized sends.

Cheers