• Resolved dkexception

    (@dkexception)


    Hello, I love this plugin. By default, the woocommerce order status will be changed to ‘processing’ after the payment is completed. Is it possible to change this to ‘on-hold’ instead?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter dkexception

    (@dkexception)

    The order status is getting changed from pending payment to processing. I want it to go to pending payment to on-hold instead.

    I tried this php snippet but it didn’t work.

    add_filter( 'woocommerce_pronamic_pay_razorpay_process_payment_order_status', 'change_order_status', 9999, 2 );

    function change_order_status( $status, $order ) {
    return 'on-hold';
    }
    Plugin Author Gautam Garg

    (@gautammkgarg)

    Hello @dkexception

    Thanks for liking Knit Pay. Your feedback gives us encouragement to provide you even better services.

    You are using wrong filter, kindly try using pronamic_payment_status_update_woocommerce action.

    We can also do the customization for you on your behalf, it will be paid service. You can contact us using link below.

    https://www.knitpay.org/contact-us/

    Thread Starter dkexception

    (@dkexception)

    Hello, I changed the code as per your suggestion:

    add_filter( 'pronamic_payment_status_update_woocommerce', 'change_order_status', 9999, 2 );

    function change_order_status( $status, $order ) {
    return 'on-hold';
    }

    However, it didn’t work. I’m using https://www.businessbloomer.com/woocommerce-payment-gateway-order-status/ for reference.

    It says:

    First of all, each payment gateway, whether it’s included in WooCommerce core or not, should provide you with a handy filter hook called “woocommerce_GATEWAYID_process_payment_order_status“, where GATEWAYID needs to be changed to the payment gateway ID.

    They have a separate post for finding the gateway ID https://www.businessbloomer.com/disable-payment-gateway-specific-user-role-woocommerce/. If I follow this step “pronamic_pay_razorpay” and not “pronamic_payment_status_update_woocommerce”. What am I doing wrong?

    Plugin Author Gautam Garg

    (@gautammkgarg)

    As discussed on phone call, you need to use pronamic_payment_status_update_woocommerce action hook to perform this task.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.