• Hello, I would like to have only “Set Order To Completed” option in the admin (backend) panel. How to remove all the other options?
    Regards!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello,

    Sorry there is no such option available from where you can remove all other status.

    Thread Starter hsi12

    (@hsi12)

    Hello, any other way like changing the code somewhere, just to hide them?

    Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello,

    Please add this code to your active theme functions.php file

    add_filter( 'rpress_order_statuses', 'rp_modify_order_status' );
    function rp_modify_order_status( $orders ) {
    	if ( is_array( $orders ) && !empty( $orders ) ) {
    		foreach( $orders as $key => $order ) {
    			if ( $key !== 'completed' ) {
    				unset( $orders[$key] );
    			}
    		}
    	}
    
    	return $orders ;
    }

    let us know whether that works fine or not for you.

    Thread Starter hsi12

    (@hsi12)

    Hello, thank you very much.
    Some options related to ‘Orders’ are disappeared after applying this above mentioned code in the function.php. But options related to “Set Payment To Pending, Processing, Refunded, Paid, Failed” are still there. Can you please let me know the code for this also.

    As I just would like to have only these 3 options:
    “Delete”, “Completed” and “Resend Email Receipts”

    Thread Starter hsi12

    (@hsi12)

    Hello, looking forward ??

    Plugin Contributor Kshirod Patel

    (@kshirod-patel)

    Hello,

    The above code only works for the order status. It doesn’t make any changes in the payment status.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Set Order To Completed’ is closed to new replies.