Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

How to hide all visible WCMp features from site?

WCMp Core

Resolved
Viewing 11 reply threads
  • Author
    Posts
    • #134900
      Michael McHugh
      Participant

      We’re setting up several very simple single-vendor print fulfillment sites just for the purposes of collecting Admin Fees for our print fulfillment services.

      So we’d like to hide all references to Vendors on the site and in the emails sent to customers, including:

      Product page:
      * Vendor Tab
      * Questions and Answers Tab
      * Report Abuse link

      Order Received Confirmation (onsite) and Order Confirmation Email:
      * “Sold By” line
      * “Vendor Details” section

      Is there a way to disable/hide all these via the admin? Or via function?

      I can hide most of the onsite things via CSS if needed, but the email items are a different issue.

      Please advise.

      Thanks,
      Michael

    • #134916

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

      // remove vendor details from emil and thank you page
      add_filter('can_vendor_add_message_on_email_and_thankyou_page', '__return_false');
      
      // remove sold by from email
      
      add_filter( 'woocommerce_display_item_meta','wcmp_email_change_sold_by_text', 10, 3 );
      function wcmp_email_change_sold_by_text($html, $item, $args ){
          $strings = array();
          $html    = '';
          foreach ( $item->get_formatted_meta_data() as $meta_id => $meta ) {
              $value = $args['autop'] ? wp_kses_post( $meta->display_value ) : wp_kses_post( make_clickable( trim( $meta->display_value ) ) );
              if( $meta->display_key != 'Sold By' ){
                  $strings[] = $args['label_before'] . wp_kses_post( $meta->display_key ) . $args['label_after'] . $value;
              }
          }
      
          if ( $strings ) {
              $html = $args['before'] . implode( $args['separator'], $strings ) . $args['after'];
          }
         
          return $html;
      }
      
      // remove report abouse link
      
      add_filter('wcmp_show_report_abuse_link', '__return_false');
      
      // remove Q&S, vendor tab
      
      add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 99 );
      function woo_remove_product_tabs( $tabs ) {
         unset( $tabs['wcmp_customer_qna'] );
         unset( $tabs['vendor'] );      	// Questions & Answers
         return $tabs;
      }
      Copy

      Regards,

    • #135027
      Michael McHugh
      Participant

      Thanks. That seems to have worked.

      Is there a way to eliminate the Vendor Registration box from the /dashboard/ login page?

    • #135061

      Hi,
      There is no such section like Vendor registration box in dashboard/login page in our vendor dashboard. See screenshot- https://prnt.sc/I0WfQDsNCOF9
      Now can you kindly explain your query with screenshot,so that we can assist you further.

    • #135077
      Michael McHugh
      Participant

      I was referring to BEFORE you login at /dashboard — see screenshot.

      We only have a single vendor or two per site, so there is no need to register, and we want to disable registration.

      I can just hide it with CSS, but was looking for a way of actually disabling the registration process entirely via setting or funciton, perhaps.

    • #135102

      The default flow is such that WCMP uses Woocommerce Login page.
      Now the Registration form part can only be hidden via CSS.
      However if you do not want to use CSS then it needs good amount of custom code to hide this.

    • #135121
      Michael McHugh
      Participant

      I’ll remove the Registration Form with CSS.

      I also just noticed that the vendor name is being pre-pended to “SHIPPING” in the cart, so it’s “AIRPHOTOS SHIPPING” which is not desired.

      Is that an edit to the function provided to prevent that? (see screenshot)

    • #135179

      Hi,
      As per the default, flow whenever a vendor gets added to a site, we create a shipping class of them. So, when they add a product, their shipping class gets added to that product.
      Therefore, WooCommerce display’s vendor’s shipping class beside shipping in the cart checkout page as the “vendor’s shipping class name”.
      This part is necessary to send the shipping amount to the vendor.

    • #135378
      Michael McHugh
      Participant

      That’s all fine, but the visible addition of the shipping class name to the lablel in cart and checkout pages are not necessary for the client to see.

      It’d be nice if that could be wrapped in a separate css tag/class, so it could be at least easily hidden from view, as it’s not relevant to the customer’s experience at all.

    • #135414

      Michael, as a solution, you can remove vendor name from shipping using this code :

      add_filter('woocommerce_shipping_package_name', function($package_name, $vendor_id, $package) {
          return  __(' Shipping', 'dc-woocommerce-multi-vendor');
      }, 99, 3);
      Copy
    • #135564
      Michael McHugh
      Participant

      Thanks. That filter worked.

    • #135618

      You are welcome @Michael McHugh

Viewing 11 reply threads

The topic ‘How to hide all visible WCMp features from site?’ is closed to new replies.