I'm using the Mollie Payments for WooCommerce plugin, and I want to programmatically change the payment description that is sent to Mollie.
By default, the description is something like:
Order 1234
I would like to customize this using code, for example:
Shopname - Productcategoryname - 1234
Is there an official or working filter or hook I can use to dynamically change the payment description that is sent to Mollie?
I tried the following (none of these exist in the current plugin version):
add_filter('mollie_wc_gateway_order_payment_description', 'my_func');
add_filter('mollie_wc_gateway_payment_order_meta_data', 'my_func');
add_filter('woocommerce_gateway_mollie_order_request', 'my_func');
I also tried setting custom order meta, hoping Mollie would pick it up:
add_action('woocommerce_checkout_create_order', function($order) {
$order->update_meta_data('_mollie_payment_description', 'Custom description');
$order->save();
});
No success — Mollie does not seem to use that.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744353824a4570129.html
评论列表(0条)