最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

How to change the payment description in Mollie for WooCommerce? - Stack Overflow

matteradmin2PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far