• Resolved barnabas1

    (@barnabas1)


    Hello,

    I’m using your plugin “Stripe for WooCommerce” and I would have liked to change the Description that is passed on to Stripe so as not to display the Title of my website but just the Order Number? I believe that this issue is connected with your plugin, as with different plugin I get different output description to Stripe.

    Can you please advise me how to do it?

    Thanks,
    Barnabas

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter barnabas1

    (@barnabas1)

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @barnabas1,

    You can use the wc_stripe_payment_intent_args filter to customize the description that appears in Stripe.

    https://docs.paymentplugins.com/wc-stripe/api/source-class-WC_Stripe_Payment_Intent.html#225

    Example:

    add_filter('wc_stripe_payment_intent_args', function($args){
        $args['description'] = sprintf('Order %1$s', $order->get_order_number());
        return $args;
    });
    Thread Starter barnabas1

    (@barnabas1)

    Hello @mrclayton,

    I tried adding this filter as you wrote it but I get an internal server error when processing the payment.
    Should I replace any string in the example you provided?

    Thanks

    • This reply was modified 4 years ago by barnabas1.
    Plugin Author Payment Plugins

    (@mrclayton)

    add_filter('wc_stripe_payment_intent_args', function($args, $order){
        $args['description'] = sprintf('Order %1$s', $order->get_order_number());
        return $args;
    }, 10, 2);

    Make sure you copy and paste into a txt file then copy from the txt file before adding to your site. That will remove special chars.

    Thread Starter barnabas1

    (@barnabas1)

    @mrclayton

    Now it works and the description displays beautifully.

    add_filter('wc_stripe_payment_intent_args', function($args, $order){
        $args['description'] = sprintf('Bookshop Order %1$s', $order->get_order_number());
        return $args;
    }, 10, 2);

    Thanks a lot

    cagsan

    (@cagsan)

    @mrclayton @barnabas1
    That’s a cool approach, but is it just for Stripe appereance, or it also effects the bill description of user on bank statement ?

    Thread Starter barnabas1

    (@barnabas1)

    @cagsan

    It affects the receipt issued by Stripe for the customer.

    The description on the bank statement is found in Stripe under Settings > Account Details > Public business information > Statement descriptor

    cagsan

    (@cagsan)

    So your method is only removing the store name on Stripe, if I understand correct ?

    Thread Starter barnabas1

    (@barnabas1)

    The store name is at the heading of the receipt issued by Stripe. I don’t need it to display again next to the order number of the same receipt, but to have a description of what that order is, in my case is “Bookshop”.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Stripe Dashboard Payment Description’ is closed to new replies.