Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Hide specific order status options for vendors
Tagged: order status Payment pending
- This topic has 1 reply, 2 voices, and was last updated 4 years, 7 months ago by WCFM Forum.
Viewing 1 reply thread
- AuthorPosts
- September 5, 2019 at 5:03 pm #80207fdeckersParticipant
Hi,
How can I disable the option for vendors to change the order status to ‘Payment pending’ after a succesful payment (via iDEAL)?
- September 6, 2019 at 10:40 am #80372WCFM ForumKeymaster
Hi,
Please add this code to your site –
add_filter( 'wcfm_allowed_order_status', function( $order_statuses, $order_id ) { if( wcfm_is_vendor() && isset( $order_statuses['wc-pending'] ) ) { $order = wc_get_order( $order_id ); if( is_a( $order, 'WC_Order' ) ) { $status = $order->get_status(); if( $status != 'pending' ) { unset( $order_statuses['wc-pending'] ); } } } return $order_statuses; }, 50, 2 );
Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- AuthorPosts
Viewing 1 reply thread
- You must be logged in to reply to this topic.