• Resolved digitalbeans

    (@robbidb)


    Hi there,

    Thanks very much for the plugin. I just have a quick question.

    We require a paper-trail of actions carried out by shop managers in case we need to revisit a refund/ask a colleague more.

    • Is it possible to submit as metadata to Stripe the username/nickname of the shop manager who carried out the action on Capture or Refund?
    • or to add an additional note when a Capture/Refund is carried out?

    I hope that makes sense. Thanks for your time ??
    Robbi

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @robbidb,

    Our API docs are a great resource for seeing what’s possible with the plugin. You can use the filter wc_stripe_refund_args to add custom metadata pertaining to the refund.

    https://docs.paymentplugins.com/wc-stripe/api/source-class-WC_Stripe_Payment.html#138

    Kind Regards,

    Thread Starter digitalbeans

    (@robbidb)

    I will work on it using your documentation now – it’s very in-depth, thanks very much for this!

    As a temporary fix (in case anyone read the thread), I used this crude solution:

    add_filter( 'woocommerce_new_order_note_data', 'filter_woocommerce_new_order_note_data', 10, 2 );
    function filter_woocommerce_new_order_note_data( $args, $args2 ) {
        if( ! $args2['is_customer_note'] && is_user_logged_in() && current_user_can( 'edit_shop_order', $args2['order_id'] ) ){
            $user = get_user_by( 'id', get_current_user_id() );
            $args['comment_author'] = $user->display_name;
            $args['comment_author_email'] = $user->user_email;
        }
        return $args;
    }

    A better solution can be created using the link from the author.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shop manager papertrail – add username to order note on Capture/Refund’ is closed to new replies.