• Resolved keramikoch

    (@keramikoch)


    Hi dear WCFM support,

    I try to hide order statuses for the vendors. The strange this is these work:

    // hide order status processing specific order sattus for vendors
    add_filter( ‘wcfm_allowed_order_status’, function( $order_status ) {
    if( isset( $order_status[‘wc-pending’] ) ) unset( $order_status[‘wc-pending’] );
    if( isset( $order_status[‘wc-processing’] ) ) unset( $order_status[‘wc-processing’] );
    if( isset( $order_status[‘wc-on-hold’] ) ) unset( $order_status[‘wc-on-hold’] );
    if( isset( $order_status[‘wc-arrival-shipment’] ) ) unset( $order_status[‘wc-arrival-shipment’] );
    if( isset( $order_status[‘wc-deliv-notpayed’] ) ) unset( $order_status[‘wc-deliv-notpayed’] );
    if( isset( $order_status[‘wc-partial-payment’] ) ) unset( $order_status[‘wc-partial-payment’] );
    if( isset( $order_status[‘wc-refunded’] ) ) unset( $order_status[‘wc-refunded’] );
    if( isset( $order_status[‘wc-completed’] ) ) unset( $order_status[‘wc-completed’] );
    if( isset( $order_status[‘wc-shipped’] ) ) unset( $order_status[‘wc-shipped’] );
    if( isset( $order_status[‘wc-vk-processing’] ) ) unset( $order_status[‘wc-vk-processing’] );

    AND these ones dont work (vendor can see them)

    if( isset( $order_status[‘wc-payment-reminder’] ) ) unset( $order_status[‘wc-payment-reminder’] );
    if( isset( $order_status[‘wc-pay-reminder2’] ) ) unset( $order_status[‘wc-pay-reminder2’] );
    if( isset( $order_status[‘wc-pay-reminder3’] ) ) unset( $order_status[‘wc-pay-reminder3’] );
    return $order_status;
    }, 50 );

    Can you help me with this?

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Code looks fine, where have you added this code? Show me a screenshot please.

    Thread Starter keramikoch

    (@keramikoch)

    Hi ,

    sure: https://ibb.co/123nGhn

    And this is the overview for the order statuses:
    https://ibb.co/KxLdTTg

    Could you login and have a look why it is not working?

    Plugin Author WC Lovers

    (@wclovers)

    Code is perfect.

    Are vendors still have these statues under their order details page? Show me a screenshot, which statues they have?

    Thread Starter keramikoch

    (@keramikoch)

    Hi dear, WCFM suppport,

    I fixed thisnow with some help by adding the following. These only shows the order statuses which should be seen. Maybe it is usefull for someone. Any chance you can include an option in WCFM which says “showing which order status for the vendor” and then you can choose? I think many people want to hide certain statuses. Anyhow thank you for your fast support.

    // hide order status processing specific order sattus for vendors
    add_filter( ‘wcfm_allowed_order_status’, function( $order_status ) {
    error_log( ‘MY STUFF: ‘ . print_r( $order_status, true ) );

    $aVal = array();

    $aVal[‘wc-return-completed’] = $order_status[‘wc-return-completed’];
    $aVal[‘wc-vendor-delivered’] = $order_status[‘wc-vendor-delivered’];

    Plugin Author WC Lovers

    (@wclovers)

    You are always welcome and thanks for the “fix” update here.

    This will definitely helpful for others ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hiding order status for vendors’ is closed to new replies.