Banner Logo

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

Product Featured Image,Gallery Image Size and Video Thumbnail Size

WCMp Core

Tagged: 

Resolved
Viewing 1 reply thread
  • Author
    Posts
    • #142575
      Anonymous
      Inactive

      I want mention and Restrict Product Featured Image,Gallery Image Size and Video Thumbnail Sizes Dimensions for vendor upload. Vendor Can’t upload the image greater then or less then the mention size.

    • #142602

      Hi @admin-6669, thanks for reaching WCMp Support.

      The dashboard scrrenshot you have shared is of another plugin, as our dashboard looks like this : https://prnt.sc/ZHos3tWm6l2o

      So, please use our plugin only and then check the dashboard again. After that add this code in the function.php of your theme, because this code will only work for WCMp Dashboard :

      /**
      **required some wcmp product field 
      **/
      add_action( 'wcmp_before_post_update', 'required_wcmp_product_field' );
      function required_wcmp_product_field(){
          $required_feature_image = isset( $_POST['featured_img'] ) ? $_POST['featured_img'] : '';
          $required_product_image = isset( $_POST['product_image_gallery'] ) ? $_POST['product_image_gallery'] : '';
          
          if(!$required_feature_image || !$required_product_image || !$required_shipping_weight_field ){
              wc_add_notice( __('You have to images and video', 'dc-woocommerce-multi-vendor'), 'error' );
              wp_redirect( apply_filters( 'wcmp_vendor_save_product_redirect_url', wcmp_get_vendor_dashboard_endpoint_url( get_wcmp_vendor_settings( 'wcmp_edit_product_endpoint', 'vendor', 'general', 'edit-product' ), $_POST['post_ID'] ) ) );
              exit;
          }
      }
      Copy
Viewing 1 reply thread

The topic ‘Product Featured Image,Gallery Image Size and Video Thumbnail Size’ is closed to new replies.