Link to trashed products missing from Products view

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Feature Request Link to trashed products missing from Products view

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #136529
      Jitske Naberman
      Participant

      Hi, I found there is no link on the Products view – and my vendors requested to be able to see deleted products.

      This could probably be resolved by a simple addition to the wcfm-view-products.php (starting from line 10) – need to add ‘trash’ to the products menu array and in the count_products array.

      $wcfmu_products_menus = apply_filters( ‘wcfmu_products_menus’, array( ‘any’ => __( ‘All’, ‘wc-frontend-manager’),
      ‘publish’ => __( ‘Published’, ‘wc-frontend-manager’),
      ‘draft’ => __( ‘Draft’, ‘wc-frontend-manager’),
      ‘pending’ => __( ‘Pending’, ‘wc-frontend-manager’),
      ‘trash’ => __( ‘Trash’, ‘wc-frontend-manager’) ) );

      $product_status = ! empty( $_GET[‘product_status’] ) ? sanitize_text_field( $_GET[‘product_status’] ) : ‘any’;

      $current_user_id = apply_filters( ‘wcfm_current_vendor_id’, get_current_user_id() );
      if( !wcfm_is_vendor() ) $current_user_id = 0;
      $count_products = array();
      $count_products[‘publish’] = wcfm_get_user_posts_count( $current_user_id, ‘product’, ‘publish’ );
      $count_products[‘pending’] = wcfm_get_user_posts_count( $current_user_id, ‘product’, ‘pending’ );
      $count_products[‘draft’] = wcfm_get_user_posts_count( $current_user_id, ‘product’, ‘draft’ );
      $count_products[‘private’] = wcfm_get_user_posts_count( $current_user_id, ‘product’, ‘private’ );
      $count_products[‘trash’] = wcfm_get_user_posts_count( $current_user_id, ‘product’, ‘trash’ );
      $count_products = apply_filters( ‘wcfmu_products_menus_count’, $count_products, $current_user_id );

    • #136531
      Jitske Naberman
      Participant

      … additionally, I’m getting the same request for Reviews – here the vendors also want to be able to view the trash folder.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.