Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author MultiVendorX

    (@wcmp)

    Hi @ammartello97, yes we do let vendors add products from the backend.

    But please note, in order to view orders, reports, they must access the frontend dashbaord.

    Thread Starter Ammar Tello

    (@ammartello97)

    Ok, I know that, but I want to be the backend as a default option.
    I don’t want the user to see the frontend option when he tries to add a product.

    Do you get me?

    • This reply was modified 2 years, 6 months ago by Ammar Tello.

    Hi,
    Kindly add below code to your active theme function.php

    add_filter( 'wcmp_vendor_dashboard_add_product_url', 'wcmp_custom_add_product_link' );
    function wcmp_custom_add_product_link() {
        $add_product_page = admin_url() . 'post-new.php?post_type=product'; 
        return $add_product_page;
    }
    
    add_filter('wcmp_vendor_product_list_product_edit_link','wcmp_custom_edit_product_link', 10, 2);
    function wcmp_custom_edit_product_link( $edit_product_link, $product ){
        if($product) {
            $new_edit_product_page = admin_url() . 'post.php?post='. $product->get_id() .'&action=edit';
            return $new_edit_product_page;
        }
        return $edit_product_link;
    }

    Regards,

    Thread Starter Ammar Tello

    (@ammartello97)

    It is working!
    Thank you very much.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add product by WordPress backend by default’ is closed to new replies.