Home Forums WC Vendors Free Support HTML code in product description

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #69460
    Gabriel Romero
    Participant

    Hello community, how are you? I want to know how can I limit the html code entry only for some users? For example, users with vendor profile can not use html code and verified sellers users if they can use it

    Regards! 😀

    #69670
    Gabriel Romero
    Participant

    Bump

    #69757
    Anna
    Member

    @xander
    Hello,
    We do not have a built-in way to only allow the HTML inputs for verified vendors, no.
    I’ll check and see if this is a feature we could look into adding for a future update, however.

    #70138
    Gabriel Romero
    Participant

    I made this little code until you can add this feature to the core

    It only works whenever the HTML function in Product Description is active and WordPress editor will only be displayed if the user is Verified Vendor
    I copied the product-edit.php to child theme and replace in the line 41 approx
    <?php WCVendors_Pro_Product_Form::description( $object_id, $product_description ); }?>

    For:

    <?php
          $current_user   	= wp_get_current_user(); 
          $verified_vendor 	= get_user_meta( $current_user->ID, '_wcv_verified_vendor', true );
          $editor_args = array(
          				'editor_height' => 300,
    			      	'media_buttons' => false,
                  ); 
    
          if($verified_vendor){
            echo '<label>Descripci&oacute;n del Producto</label>';
            wp_editor( $product_description, 'post_content', $editor_args );
          }else{
            WCVendors_Pro_Product_Form::description( $object_id, $product_description ); }?>

    (I’m a super noob in terms of programming)

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WC Vendors Free Support’ is closed to new topics and replies.