Home Forums WC Vendors Pro Support Change the number of gallery uploads per product

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 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16224
    Stefan
    Participant

    Hey guys and gals!

    How can I change the number of images vendors can upload to the gallery? Right now this limit seems to be 4.

    Thanks! 🙂

    #16268
    WC Vendors Support
    Participant

    Hi Stefan,

    There is a filter for this — it’s called wcv_product_gallery_options. The code you’d want to use is:

    add_filter('wcv_product_gallery_options', 'custom_wcv_product_gallery_options');
    function custom_wcv_product_gallery_options( $gallery_options ){
        $gallery_options[ 'max_upload' ] = 1;
        return $gallery_options;
    }

    ….however, you can’t. It appears that filter is broken in v1.1.0 so we’ll have to have that patched up for v1.1.1.

    Till then, you can simply edit: /public/class-wcvendors-pro-form-helper.php and on line #612 change the number 4 to whatever number you like, and when v1.1.1 comes out that filter code above will work.

    #16328
    Stefan
    Participant

    Wow! That was extremely helpful 🙂

    Thank you for the detailed information, Ben!

    Consider this post “LIKE”-d 🙂

    #16720
    jason
    Participant

    Hi Ben – did you manage to fix this in 1.1.1 and is the only option to change the code?

    Just wary that, if I update the code, it will not be replaced at the next pro upgrade.

    Thanks,
    J.

    #16721
    Stefan
    Participant

    Hey Jason,

    Yes, the filter above works in version 1.1.1. 🙂 I’m already using it 🙂

    You can either change the value in the plugin’s relevant file or paste the filter Ben suggested in your functions file. Both work fine.

    However, if you choose the former, you will definitely lose your settings when you update to a newer release. Instead, just paste the filter Ben suggested in your functions file and there shouldn’t be any problem with future upgrades 🙂

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