Change Vendor text on single product

WCMp Vendor Membership

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #132197
      lblousi
      Participant

      Hello hope you’re doing great,

      I want to add a class is that is possible on the paragraph that has the vendor text in the single product page.

      I want to change that and decorate it in my single page so how may I access that?

      Thanks in advance!

    • #132199

      Hi, thank you for getting in touch with us.
      Kindly confirm whether you want to change “Sold by Vendor name” or “Vendor tab” in single product page.
      Can you share a screenshot where you want to add the class.

    • #132233
      lblousi
      Participant
      This reply has been marked as private.
    • #132263

      Hi,
      To add class to the Sold by vendor add below code to your funcion.php theme made your custom change here.

      add_action('init', 'wcmp_soldby_text');
      function wcmp_soldby_text(){
          global $WCMp;
          /* for single product */
          remove_action('woocommerce_product_meta_start', array($WCMp->vendor_caps, 'wcmp_after_add_to_cart_form'), 25);
          /* for single product */
          add_action('woocommerce_product_meta_start', 'wcmp_after_add_to_cart_form', 25);
      }
      function wcmp_after_add_to_cart_form() {
          global $post;
          if ('Enable' === get_wcmp_vendor_settings('sold_by_catalog', 'general') && apply_filters('wcmp_sold_by_text_after_products_shop_page', true, $post->ID)) {
              $vendor = get_wcmp_product_vendors($post->ID);
              if ($vendor) {
                  $sold_by_text = apply_filters('wcmp_sold_by_text', __('Sold By', 'dc-woocommerce-multi-vendor'), $post->ID);
                  echo '<a class="by-vendor-name-link" style="display: block;" href="' . $vendor->permalink . '">' . $sold_by_text . ' ' . $vendor->page_title . '</a>';// add your class here or change as per yore requirement.
              }
          }
      }
      Copy

      Regards,

    • #132281
      lblousi
      Participant

      Thank you very much for your time and consideration!

      Have an amazing day!

    • #132285

      Welcome

Viewing 5 reply threads

The topic ‘Change Vendor text on single product’ is closed to new replies.