-
Notifications
You must be signed in to change notification settings - Fork 53
Helpful snippets
David de Boer edited this page Aug 10, 2017
·
19 revisions
Want to make small changes to the "Mollie Payments for WooCommerce" plugin? Use these snippets, provided by others users. Use at your own risk!
function remove_mollie_payment_status_message_in_mails(){
global $gateway;
remove_action('woocommerce_email_after_order_table', array($gateway, 'displayInstructions'), 10);
}
add_action( 'woocommerce_email_after_order_table', 'remove_mollie_payment_status_message_in_mails', 1, 0);
By @afeistenauer in Issue 99
Unfortunately it's not possible to change our module to support payment fees. The problem is that our module adds multiple payment methods, and the payment fee modules don't support this.
What I did find was that with some programming you could add the payment fees with the Pay for Payment module (WordPress plugin directory or GitHub). You should add the following code to the plugin Code Snippets or add it to your functions.php file. Below an example for the creditcard payment method.
//add 8 euro's for credit card
function mollie_creditcard_amount ($cost, $calculation_base, $current_gateway, $taxable, $include_taxes, $tax_class)
{
// CreditCard costs 25 cents + 2.8%
return 8;
}
add_filter("woocommerce_pay4pay_mollie_wc_gateway_creditcard_amount", "mollie_creditcard_amount", 10, 6);
Source: Issue 24