admin管理员组

文章数量:1406921

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.

本文标签: How to change the payment description in Mollie for WooCommerceStack Overflow