Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Dhruvin

    (@dhruvin)

    Hi @kevinmamaqi currently it is not possible in the Lite version directly to limit to a few products but the Pro version has this feature.

    If you are a developer and comfortable editing files then you can add the below code in file class-wau-front-end.php located at woo-addon-uploads/includes/ folder line 58

        function addon_uploads_section(){
          
          global $product;
    
          $products = array( '675' );
    
          $addon_settings = get_option( 'wau_addon_settings' );
    
          if( isset($addon_settings['wau_enable_addon']) && $addon_settings['wau_enable_addon'] === '1' && in_array($product->get_id(), $products) ){
            $file_upload_template = 
              '<div>' . _e( 'Upload an image:', 'woo-addon-uplds' ) . '<input type="file" name="wau_file_addon" id="wau_file_addon" accept="image/*" class="wau-auto-width wau-files" /></div>';
            echo $file_upload_template;
          }
          
        }

    in place of 675 add your product ids.

    Do let me know how it goes.

    Thanks!

    Thread Starter Kevin Mamaqi Kapllani

    (@kevinmamaqi)

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is it possible to programmatically limit it to certain products?’ is closed to new replies.