Hi
If you are using in addition to ifthenpay gateway any of the default woocommerce gateways, commenting out that line will duplicate the email instructions.
ifthenpay gateway has support for Polylang but the woocommerce default extentions don’t, so this is required.
So a better solution than just commenting out the line is to replace the entire function with this one
public function removeGatewayActions()
{
$default_gateways = array('bacs', 'cheque', 'cod');
foreach ($this->enabledGateways as $gateway) {
if (in_array($gateway->id, $default_gateways)) {
remove_action('woocommerce_email_before_order_table', array($gateway, 'email_instructions'));
remove_action('woocommerce_thankyou_'.$gateway->id, array($gateway, 'thankyou_page'));
//remove_action( 'woocommerce_update_options_payment_gateways_' . $gateway->id, array( $gateway, 'process_admin_options' ) );
}
if ('bacs' == $gateway->id) {
remove_action('woocommerce_update_options_payment_gateways_'.$gateway->id, array($gateway, 'save_account_details'));
}
}
}
Untested but should work. I will prepare a patch for Hyyan to publish when he has time.
In case you don’t want to play around with code, just download the new release candidate (0.29) not released yet from github.
https://github.com/hyyan/woo-poly-integration/archive/new_release.zip
It contain a few more fixes:
* Fixed PHP notice due to Polylang deprecated functions
* Fixed WordPress database error in reports page
* Fixed missing argument warning in order detailspage and emails
* Fixed strpos() empty needle warning for empty endpoints
* Fix removing email instructions from 3rd party payment gateways
Hi,
Problem solved, thank you for your help.
Ifthenpay already released fix for this too.
Congrats for your great work.
Regards.
I’m happy to hear that you got it to work. Thanks for the feedback. Please don’t forget to mark the thread as resolved.