• Resolved hardaywork20

    (@hardaywork20)


    When vendor views order there are 3 sections at the top. Billing Address, Shipping Address, and Customer Detail. In Customer Detail is the customer Username and email.
    How can you remove the billing address, shipping address, and email – leaving only the username?

    Also for digital downloaded products why do vendor need to mark complete? How can you autocomplete digital downloaded products?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter hardaywork20

    (@hardaywork20)

    legacy plugin does not work at all. seems broken now.

    Hi @hardaywork20, thanks for getting in touch with us.

    In order to remove billing address, shipping address, and email, add this code in the function.php of the current active theme :

    add_filter('wcmp_vendor_dash_customer_details_data','remove_customer_phone');
    function remove_customer_phone($data){
    unset($data['phone']);
    unset($data['email']);
    return $data;
    }
    add_filter('is_vendor_can_see_order_shipping_address', '__return_false');
    add_filter('is_vendor_can_see_order_billing_address', '__return_false');

    Now to autocomplete sub order for the downloadable product (if the main order is completed), add this code :

    // Auto complete sub orders
    add_action( 'woocommerce_order_status_completed', 'wcmp_order_status_completed' );
    function wcmp_order_status_completed( $order_id ) {
     global $WCMp;
     $suborder_details = get_wcmp_suborders($order_id);
     foreach ($suborder_details as $key => $value) {
         $suborder_fetch = array(
             'ID'           => $value->get_id(),
             'post_status'   => 'wc-completed',
         );
         wp_update_post( $suborder_fetch );
     }
    }

    Now, to make main order auto-complete, you may use some plugin like: https://www.ads-software.com/plugins/autocomplete-woocommerce-orders/
    Please note, we haven’t tested this plugin on our end.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove Customer Details Not Working’ is closed to new replies.