WooCommerce Lottery Pick Number and how to avoid on hold for orders and duplicate numbers in orders

In pick number it is possible to have two users selecting same number unless things are properly set up. How that could happen? For example one user selects number and does not pay for order right away but later on whole order is still created and available for payment / checkou. In meantime other user purchased that number in other client’s order. If 1st user tries to make payment order will go on hold due to duplicate ticket. This is normal behaviour of plugin.

How can site owner prevent this situtation?

  1. Lottery Pick Number comes with ticket reservation setting, it is located in Woo Settings > Lottery
  2. sensible value for reservation is 5 minutes, this means tickets will be unable for selection to others for 5 mins after user adds it to cart
  3. now we need to define time in which order will be cancelled if not paid, this is done via setting called “Hold Stock”, in Woo Settings > Products > Inventory tab, you need to set hold stock to 1 minute less than reservation time, so set it to 4 mins

This way we allowed each user 4 minutes to complete payment and finalize order, 1 minute later ticket will be freed if order was not completed. Settings explained here apply both to randomly assigned number and manual ticket number picking.

If you have some questions please open ticket here.

WooCommerce Simple Auctions v3.0 bidder verification and auto charge for won auctions

We have released new update for WooCommerce Simple Auctions v3.0 with two new features you asked for: allow bids if user has stored credit card and auto charge for won auctions if user has stored credit card. These new features work with WooCommerce Stripe Payment gateway.

First one allows users which have valid payment option saved (credit card) to place bids. This way you can verify user’s payment method.

Second feature allows to automatically charge saved card in case user has won auction. Order is automatically created and saved credit card is charged.

New settings in WooCommerce Settings > Auctions tab.
WooCommerce Stripe Payment Gateway setting that needs to be enabled for these new features.
Screenshot of user’s My Account page > Payment methods with saved credit card. Credit cards are saved on Stripe not on your website so no worries about PCI compliance.

New version is published on CodeCanyon. If you have questions feel free to open support ticket.

WooCommerce 8.5.0 triggering mod_security rule and causing 403 error

Recently we have came accross issue with WooCommerce versions 8.5.0 and higher which has enabled feature “Order Attribution (Order Attribution Enable this feature to track and credit channels and campaigns that contribute to orders on your site)”.

Issue is that this feature triggers ModSecurity Comodo rule ID 218500 (SQLmap attack detected). Triggering that rule prevents access to site for all users and could potentially ban user’s IP via firewall.

You might want to disable this option or skip the rule (can be done usually in your control panel or you need to contact hosting support).

FAQ for WooCommerce Group Buy and Deals

Here you can find answers to frequently asked questions. Feel free to contact us if you can’t find answer to your question.

  1. Is user registration necessary? – No, if you skip entering “max deals per user” option. If you need that option then user registration is needed because we do not have reliable way to track number of deals per user.
  2. I want to instantly finish group buy deal. How can I do that? – You need to change end date timestamp to current time and group buy deal will be instantly finished.
  3. Can users create their own deals? – Basically yes, only users who can add new products can create deals. You can use multiple vendor plugin which will allow you to add users who will be able to create products (deals). You can use WooCommerce Product Vendors (there is no frontend submission for group buy / deals).
  4. Do you use cronjobs? Why do we use cronjobs? – Yes. Please check installation instructions. WordPress cronjob is run on every visit (page load), it’s fine for small and not so busy websites. But sometimes you do not have enough hits (visitors) and group buy will be finished when visitor loads page (and cronjob) instead on its end timestamp. That’s why we use real cronjobs – to make sure your group buy / deal will end on time. Also on busy websites you need to turn off WordPress cron and create cronjob for it to avoid cron being loaded on every hit and generating performance penalty.
  5. Where can I edit email templates? – Go to WooCommerce > Settings and click on Emails tab.
  6. Does this plugin work with caching plugins? – Yes, for example WP Super Cache and W3TC is working but we advise no caching for logged in users. If page cache is enabled some widgets will not work – like recently viewed deals. Once user is logged in and there is no caching anymore all widgets will be updated in real time. You can use CDN and browser caching. Our plugin demo website uses WP Super Cache with page and browser caching. All of our plugins have same requirements for caching as WooCommerce – check it here https://developer.woo.com/docs/how-to-configure-caching-plugins-for-woocommerce/
  7. Can I make theme with WooCommerce Group Buy and sell it on ThemeForest? – Sure, just purchase extended licence and you’re good to go. Since the current licenses do not deal with re-selling Items, Envato lets authors to decide whether they grant permission for bundling Items or not. We have the following conditions, and you need to follow them:
    • You cannot redistribute the item “as-is”, even if you modify it or you make a derivative version for another platform
    • You cannot offer the plugin as a stand-alone item
    • You cannot include the plugin separately from your theme in the download package
    • You cannot provide an Item Purchase Code for your customers – Since Envato doesn’t have a “multi-use” or transferable license, your customers are not entitled to receive an Item Purchase Code with your theme and use the plugin separately from your work.
    • Updating the plugin is your own responsibility
    • Since your customers cannot receive updates from us, you need to handle this on your own
    • You need to handle related support requests after your customers or you can instruct them to buy regular licence and ask us for support directly via our CodeCanyon profile (we cannot provide free support for your customers)
  8. I can’t do anything because I get “out of stock message”? – group buy plugin needs inventory / stock to be enabled. If you have problems all issues should be fixed by upgrading to WooCommerce Group Buy v1.1.6
  9. How can I update plugin with new version? Is auto updating possible? – We suggest you to install Envato Marketplace (installation instructions can be found on plugin’s url) plugin for auto update plugin and themes purchased on Envato. Setup is easy. Manual updating can be done by downloading new version of plugin and overwrite old files with new ones or deleting old plugin and installing new one.

    Note:

    If you have modified plugin files (templates) then you need to be careful when updating so you don’t overwrite changes you made and that templates are inside child theme or theme woocommerce/ template folder.

  10. Does WooCommerce Group Buy work with WordPress import / export tools? – Yes, you can export and import deals with standard WordPress import / export tools that are located in Admin -> Tools menu.
  11. How can I enable user registration on login page? – You need to enable that feature in Woocommerce settings.
  12. I have installed your plugin but images are not aligned, buttons are too small / big, input fields needs to be smaller / bigger, can you help? – In short no.

    It’s your duty to modify plugin template to match your style and theme. Themes can implement different ways how they customize pages and parts of Woocommerce. We cannot guarantee that our plugin will look same as in our demo for every possible theme out there. Web developing is more than getting a theme and couple plugins, enabling them and deliver web site. Our templates are coded by standards and they adhere to WordPress and WooCommerce template structure. That means that minimal intervention is needed from client side, but sometimes there is no way to avoid template changes. Some themes use similar structure and have minimal interventions in structure and our plugin looks good out of the box and some do not. It’s your task as web developer and client who purchased plugin to modify and customize plugin templates to match your own (or client’s) needs and styles. This is part of developing a web site. You cannot expect that everything will be perfect for every possible theme and plugin comibation out there or that we will do your job for you as part of support. We support plugin – we do not style and customize client’s sites. Thanks for understanding.

    Note:

    Right way to customize plugin’s templates is to copy contest of plugin_dir/groupby-for-woocommerce/templates/ directory to your_theme/woocommerce/ directory and do modifications there.

    When you ask us for support make sure it’s not related to tasks we don’t do as part of support:

    – style or customize your theme to do this or that

    – provide support for bugs caused by 3rd party plugins or themes (we can pinpoint the problem)

    – send you CSS or HTML code for modifying html elements

  13. Can users buy deals without signup / register first? – Yes, guest checkout is possible if you do not set “max deals per user” option. Otherwise (if you set it) it is impossible to have users purchase deals before they’re logged in because we can not count consistently their previously purchased deals only those in cart can be counted and we cannot check “max deals per user”.
  14. 3rd party plugin is causing problems? Its developers tell you that we need to fix our plugin?

    Woocommerce extensions should be transparent – meaning one extension should work with another without introduction of special code that makes them compatible. Imagine what would happen and how much time we would need to spend if we would have to add a bit of compatibility code for every Woocommerce extension that’s out there – we would end up in huge plugin with tons of problems which would be problem to test and debug. That’s why we think every plugin developer should stick to Woocommerce coding standards and APIs (they’re there for that reason) and not require 3rd party developers to code something into their extensions / plugins so that it could work with theirs.
  15. How can I translate plugin to my language? Do you have translations?

    We only maintain english translation. We do not have resources to quality maintain other translations. Here are steps which can help you to traslate plugin or change some strings yourself:

    • you will use file plugins/groupby-for-woocommerce/languages/wc_groupbuy.pot to create your translation
    • you need to download and install Poedit https://poedit.net/download
    • download wc_groupbuy.pot and open it with Poedit
    • do your translations with Poedit
    • when done save wc_groupbuy-en_GB.po, saving wc_groupbuy-en_GB.po will create wc_groupbuy-en_GB.mo
    • you need to upload both files to /wp-content/languages/plugins/ and not to plugin directory because translations will be lost if you update plugin by deleting old one

    Note:

    In filename wc_groupbuy-en_GB.po suffix en_GB must match your language settings in WordPress, otherwise language will not be loaded. So for example you can have wc_groupbuy-en_AU.mo, wc_groupbuy-af.mo or wc_groupbuy-en_CA.mo, complete list of available suffixes are here https://make.wordpress.org/polyglots/teams/

  16. Order has been canceled but I still see same deals sold and status bar does not go back to previous or zero value. What should I do? This happens only if order was completed and then cancelled. In that case purchases have been logged and you need to go to edit product -> groupbuy History block and manually delete entries that have been cancelled.
  17. How I know that group buy / deal was success or fail? What to do when group buy deal is finished? Administrator should receive email notification in both cases. In wp-admin -> WooCommerce product list you will have icon depicting (in recent versions of WooCommerce you will need to use plugin called WooCommerce Product Type Column) active or finished group buy deal. Once group buy has finished go to that particular product (edit product) and find groupbuy history block where you will be able to see groupbuy history (purchases) and order number for each group buy purchase. If group buy has failed you will be able to refund money (if supported by your payment provider). Some screenshots are here. If you created group buy product from simple product make sure to be extra careful since refund feature will refund regular product orders too. We strongly suggest against converting regular product with orders to group buy!
  18. Does WooCommerce Group Buy and Deals work with your WooCommerce Simple Bulk Discount plugin? Yes, it works fine in combination with WooCommerce Simple Bulk Discount plugin.
  19. How can I add countdown timer / counter on all pages not only on single product page? There is setting for that – click “WooCommerce Settings” then “Group Buy Settings” tab and find option called “Group Buy deals time countdown”. Enable / disable it. You can use this code https://pastebin.com/ifa8vZvh (obsolete)
  20. I do not see group buy progress bar despite enabling it on single product page? End value on progress bar is missing? This happens when you don’t enter max number of deals. Just enter same number as min number if it is not different than minimal number of deals and that will sort these issues.
  21. Does Group Buy & Deals support product variations? No, variations are not supported. However if you want to have deal where you can choose color or other attribute you can use https://woocommerce.com/products/product-add-ons/
  22. Refund feature does not work? How can I tell if my payment gateway supports refunds? If you got this error: “Payment does not support refund” your gateway just does not implement refund feature. Here is link for more infos about how to check if gateway supports refund feature. Keep on your mind that for issuing refund you need to click on refund button in product details, there are not automatic refunds.
  23. I want to export order(s) data. How can I do that? – There are plugins that allow exporting of various order data as CSV file which you can then import to some other software you use for order management. We can suggest you to use Advanced Order Export For WooCommerce. These plugins work with custom product types which are used in this plugin.
  24. Do you recommend any credit / wallet plugin for WooCommerce that works with this plugin? – Yes, you can use TeraWallet plugin which adds new credit payment gateway and works with our plugin just fine. Users or admins can top up wallet credit balance with regular payment gateways or manually.
  25. Product type column vanished in WooCommerce product list, how can I get it back? – From WooCommerce 3.4.0 update, WooCommerce developers removed that column in product list (as a result of users’ feedback). There is way to restore it back using this plugin https://wordpress.org/plugins/woocommerce-product-type-column/
  26. I have manually refunded order but stock (progress bar) does not reflect this change? – When doing manual order refund please mark order as cancelled after refund. That will get group buy stock back.
  27. How can I add “Add to Cart” button for group buy / deals on shop page (product archive page)? – You can use this code snippet in your child theme’s functions.php file https://pastebin.com/XRF49HjV
  28. List of Group Buy custom product metafields:
    _groupbuy_dates_from
    _groupbuy_dates_to
    _groupbuy_participants_count
    _groupbuy_regular_price
    _groupbuy_max_deals_per_user
    _groupbuy_min_deals
    _groupbuy_max_deals
    _groupbuy_relisted
    _groupbuy_closed
    _groupbuy_started
    _groupbuy_has_started
    _groupbuy_fail_reason
    _groupbuy_participant_id
    _groupbuy_participants_count
    _groupbuy_order_hold_on
    

FAQ for WooCommerce Simple Auctions

Here you can find answers to frequently asked questions. Feel free to contact us if you can’t find answer to your question.

  1. Do you have list of hooks and filters? – Yes, hook list is below:
    woocommerce_simple_auctions_before_place_bid
    woocommerce_simple_auctions_outbid
    woocommerce_simple_auctions_proxy_outbid
    woocommerce_simple_auctions_place_bid
    woocommerce_simple_auctions_log_bid
    woocommerce_simple_auctions_place_sealedbid
    woocommerce_simple_auction_started
    woocommerce_simple_auction_finished
    woocommerce_simple_auction_close
    woocommerce_simple_auction_fail
    woocommerce_simple_auction_reserve_fail
    woocommerce_simple_auction_won
    pre_get_auction_search_form
    woocommerce_before_bid_form
    woocommerce_before_bid_button
    woocommerce_after_bid_button
    woocommerce_after_bid_form
    woocommerce_product_options_auction
    woocommerce_simple_auction_do_relist
    woocomerce_before_relist_failed_auction
    woocomerce_after_relist_failed_auction
    woocomerce_before_relist_not_paid_auction
    woocomerce_after_relist_not_paid_auction
    woocommerce_simple_auction_pay_reminder
    woocommerce_simple_auction_close_buynow
    woocommerce_simple_auction_delete_bid
    woocommerce_simple_auction_admin_history_header
    woocommerce_simple_auction_admin_history_row
    woocommerce_simple_auction_end_auctions_meta_callback
    woocommerce_simple_auction_after_delete_fom_watchlist
    woocommerce_simple_auction_after_add_to_watchlist
    woocommerce_simple_auction_closing_soon
    woocommerce_simple_auctions_changed_max_bid
    woocommerce_simple_auctions_changed_min_bid
    			
    Example:
    <?php add_action( 'woocommerce_simple_auctions_before_place_bid, 'custom_function' );  ?>

    Here is list of all filters:

    woocommerce_simple_auctions_before_place_bid
    woocommerce_simple_auctions_proxy_curent_bid_value
    woocommerce_simple_auctions_proxy_bid_value
    simple_auction_item_condition
    simple_auction_type
    woocommerce_simple_auctions_get_current_bid
    woocommerce_simple_auctions_get_increase_bid_value
    woocommerce_simple_auctions_get_condition
    woocommerce_simple_auctions_get_auction_end_time
    woocommerce_simple_auctions_get_auction_start_time
    woocommerce_simple_auctions_get_seconds_remaining
    woocommerce_simple_auctions_get_seconds_to_auction
    woocommerce_simple_auctions_bid_value
    woocommerce_simple_auctions_is_user_biding
    woocommerce_simple_auctions_get_user_max_bid
    woocommerce_simple_auctions_is_sealed
    wsa_default_auction_orderby
    wsa_default_auction_orderby_options
    woocommerce_simple_auction_auction_bage
    woocommerce_simple_auction_pay_now_button
    woocommerce_auction_history_heading
    woocommerce__auction_history_data
    auction_history_started_text
    auction_history_starting_text
    woocommerce_simple_auctions_placed_bid_message
    woocommerce_simple_auctions_winning_bid_message
    woocommerce_simple_auction_empty_cart
    simple_auctions_relist_date_from
    simple_auctions_relist_date_to
    woocommerce_place_bid_product_id
    woocommerce_place_bid_bid
    woocommerce_place_bid_handler
    remove_auctions_from_woocommerce_product_query
    woocommerce_simple_auctions_displayname
    simple_auction_ajax_finish_auction
    simple_auction_get_price_for_auctions
    reserve_bid_text
    reserve_met_bid_text
    sealed_bid_text
    sealed_min_text
    woocommerce_simple_auctions_activity_query
    woocommerce_simple_auctions_place_bid_value
    woocommerce_simple_auctions_before_place_bid_filter
    woocommerce_simple_auctions_minimal_bid_value
    woocommerce_simple_auctions_proxy_bid_to_reserve
    woocommerce_simple_auctions_proxy_curent_bid_value
    woocommerce_simple_auctions_proxy_bid_value
    woocommerce_simple_auctions_is_user_watching
    woocommerce_shortcode_auctions_query
    woocommerce_product_query_max_rand_cache_count
    woocommerce_simple_auctions_activity_column_default
    woocommerce_simple_auctions_activity_row_class
    woocommerce_simple_auctions_activity_columns
    woocommerce_simple_auctions_activity_sortable_columns
    get_auction_search_form
    time_text
    bid_text
    woocommerce_simple_auction_winning_bage
    
  2. How to use simple_auction_item_condition filter? – In functions.php add:
    add_filter('simple_auction_item_condition', 'my_example_filter_1' );
    function my_example_filter_1( $array ){
    
    	$array['old']='Old';
    
    	return $array;
    }
    
    and in product data you will get new product condition option available to select named “Old”.
  3. How to increase bid step for bid increment value to be more than 1? Bidding increment is done so you can bid in increments of 1, because otherwise if you set bid step of say 5, you would be able to bid 5, 10, 15… instead you can bid 7, 13, 22, etc. If you insist on different behaviour, you need to edit template woocommerce-simple-auctions\templates\single-product\auction-bid-form.php line 50 and change:
    step="any"
    
    becomes
    
    step="<?php echo ($product->get_increase_bid_value()) ? $product->get_increase_bid_value() : '1' ?>"
    
    Please check template on pastebin.
  4. Can I delete fake bid? – Yes, go to item details, section Auction where auction log is and click on delete.
  5. Can users create their own auctions like on eBay? Can I charge fee for auctions published by users? – Yes but you need 3rd party plugin for implementing WooCommerce multivendor / marketplace. Then your users will be able to post auctions and you can charge fee for their sales. You can use Dokan multivendor plugin which has frontend auction submissions (you need Business version or Free, Starter, Professional with Auction module). There is also free plugin which allows you to charge a fee on checkout.
  6. Do you use cronjobs? – Yes. Please check installation instructions. Cronjobs are used to finish auctions consistently for all users and at right time, send email notifications and automatically relist expired / failed auctions (optional). Auction check cron has to be run every minute, script will be loading for almost 1 minute, then it stops with HTTP 200 response code – there should be no output just blank page. Read here why we use and suggest real cronjobs for our plugins (and WordPress).
  7. Where can I edit email templates? – Go to WooCommerce > Settings and click on Emails tab.
  8. Does this plugin work with caching plugins? – Yes, WP Super Cache and W3TC work fine with our plugin but we advise no caching for logged in users. For example if page cache is enabled widget recently viewed auctions will not work properly. Once user is logged in and there is no caching anymore all widgets work. You can use CDN and browser caching. Our plugin demo website uses WP Super Cache with page and browser cache. All of our plugins have same requirements for caching as WooCommerce – check it here https://docs.woocommerce.com/document/configuring-caching-plugins/
  9. What is auto bidding / proxy bidding? – Ebay has nice explanation here. Basically you enter your max bid value but plugin raises current bid to current bid + min bid increase instead to your max value entered. Regular bidder will be outbidded automatically until your max bid value is reached.
  10. What is reserve price? – A reserve price is the lowest price at which you are willing to sell your item. If you do not want to sell your item below a certain price, you can a set a reserve price. The amount of your reserve price is not disclosed to your bidders, but they will see that your auction has a reserve price and whether or not the reserve has been met. If a bidder does not meet that price, you are not obligated to sell your item.
  11. I want auction end timer on product archive, shortcodes and widgets, what should I do? – You can add this code snippet to functions.php https://pastebin.com/BWiswYec
  12. I want to increase / extend auction end time after bid was placed? – Add this code to functions.php (this particular code extends auction for 30 sec – note PT30S) https://pastebin.com/gv8WaNDq
  13. I want to extended auction finish time after a bid is placed so that it only extends the auction if a bid is placed when the auction is within 5 min of closing? Auction anti snipping feature. – From version v2.1.0 this feature is integrated in plugin and no need to use code snippet for this.
  14. Bidder beat another bidder with same amount? – When Proxy Bidding is in effect, it can appear as if one bidder has beat another bidder with the same bid amount. This is normal and occurs when a bidder has a proxy bid in effect and a second bidder comes along and makes their bid at the exact same amount the current proxy bid is at. Since the proxy bid was placed earlier, that is the bid that will succeed. For the second bidder to succeed in placing a bid, they must bid higher than the proxy bid that is in effect.
  15. How can I show only finished auctions? – You need custom page template with custom query:
    
    $args = array(
     'post_type'   => 'product',
     'tax_query' => array(array('taxonomy' => 'product_type' , 'field' => 'slug', 'terms' => 'auction')),
     'meta_query' => array(
    	array(
    		'key' => '_auction_closed',
    		'operator' => 'EXISTS',
    	)
        ),
    'auction_arhive' => TRUE,
    'show_past_auctions' => TRUE
    );
    
    $the_query  = new WP_Query( $args );
    
    You can download custom page template with custom query for auctions which shows only finished auctions. There is also shortcode to show past / finished auctions. Here is another example: custom page template that shows finished but not paid auctions.
  16. Can I make theme with WooCommerce Simple Auctions and sell it on ThemeForest? – Sure, just purchase extended licence and you’re good to go. Since the current licenses do not deal with re-selling Items, Envato lets authors to decide whether they grant permission for bundling Items or not. We have the following conditions, and you need to follow them:
    • You cannot redistribute the item “as-is”, even if you modify it or you make a derivative version for another platform
    • You cannot offer the plugin as a stand-alone item
    • You cannot include the plugin separately from your theme in the download package
    • You cannot provide an Item Purchase Code for your customers – Since Envato doesn’t have a “multi-use” or transferable license, your customers are not entitled to receive an Item Purchase Code with your theme and use the plugin separately from your work.
    • Updating the plugin is your own responsibility
    • Since your customers cannot receive updates from us, you need to handle this on your own
    • You need to handle related support requests after your customers or you can instruct them to buy regular licence and ask us for support directly via our CodeCanyon profile (we cannot provide free support for your customers)
  17. I can’t do anything because I get “out of stock message”? – Simple Auctions plugin needs inventory / stock to be enabled. If you have problems all issues should be fixed by upgrading to WooCommerce Simple Auctions v1.1.6
  18. I want to enable users to bid even if they are allready highest bidder? – In update v1.1.25 we have added setting option “Allow highest bidder to outbid himself”, please use that setting to allow outbidding.
  19. I have installed WC Vendors and I do not see auction product type? – WC Vendors support WooCommerce Simple Auctions plugin. If you have issues we recommend that you contact WC Vendors support. Other multivendor plugins that support Simple Auctions can be found here.
  20. How can I update plugin with new version? Is auto updating possible? – We suggest you to install Envato Marketplace (installation instructions can be found on plugin’s url) plugin for auto update plugin and themes purchased on Envato. Setup is easy. Manual updating can be done by downloading new version of plugin and overwrite old files with new ones or deleting old plugin and installing new one.

    Note:

    If you have modified plugin files (templates) then you need to be careful when updating so you don’t overwrite changes you made and that templates are inside child theme or theme woocommerce/ template folder.

  21. How to change max bid for proxy bidding? – There is setting in WooCommerce Settings > Auction that needs to be enabled which allows users to change their max bid value.
  22. Is it possible when a customer wins 2 or more auctions they all appear in the cart at the same time and than check-out all items at once? I want more than one auction in cart! – In file woocommerce-simple-auctions\woocommerce-simple-auctions.php find and comment line 1510:

    // WC()->cart->empty_cart();
    


    You might want to change this line:

    wp_safe_redirect( remove_query_arg( array( 'pay-auction', 'quantity', 'product_id' ), wc_get_checkout_url()) ) );


    to

    wp_safe_redirect( remove_query_arg( array( 'pay-auction', 'quantity', 'product_id' ), wc_get_cart_url() ) );


    so auction Pay Now button leads to cart instead going directly to checkout.

  23. How to increase bid input field? – Easiest way is by using custom CSS:

    You can use this CSS to add it to your theme’s custom CSS:

    input[name=bid_value] { width: 195px !important; }
    screenshot

    Note:

    You may noticed double plus and minus near bid input field on screenshot above. This is known issue with some themes. For solution see FAQ item no 25.

  24. The Sort by price does not work. Is it posible to sort the auctions based on what has the highest or lowest bid? – Yes, we have added auction specific sorting. Frontend auction sorting is availabe, you can sort auctions by current bid, date, buy now price, activity, ending date (ending soonest) and start date (recently started). Feature is available from version 1.2 of Simple Auction plugin.
  25. I see two plus and minus buttons near bid input field? – This is known issue with some themes, due to their JS, solution is simple you need to comment out last line (173) in file woocommerce-simple-auctions\js\simple-auction-frontend.js (example of that problem can be seen on screenshot in FAQ no 23):

    // jQuery(function($){$(".auction_form div.quantity:not(.buttons_added)
    

    Fix for Enfold theme is modified bid.php template file which you need to copy to your_child_theme/wooocommerce/single-product/bid.php to remove double plus / minus buttons.

    We also have fix for Woodmart Theme, just add this code snippet to your child theme functions.php file.
  26. I want to remove automatic relist option for users (for example when using multi vendor / sellers plugin)? You can use this code to do that (add code to your theme’s functions.php file):

    function remove_post_custom_fields() {
    	remove_meta_box( 'Automatic_relist_auction' , 'product' , 'normal' );
    }
    add_action( 'add_meta_boxes', 'remove_post_custom_fields', 20);
    
  27. Is there a way to enable confirmation before placing a bid? Yes, you can use this code (http://pastebin.com/pKZurFsB):

    function print_my_inline_script() {
      if ( is_product()) {
    	?>
    	<script type="text/javascript">
    		jQuery('.auction_form.cart').submit(function() {
    			var c = confirm("Click OK to continue?");
    			return c; //you can just return c because it will be true or false
    		});
    	</script>
    	<?php
      }
    }
    add_action( 'wp_footer', 'print_my_inline_script' );
    
  28. Does WooCommerce Simple Auctions work with WordPress import / export tools? – Yes, you can export and import auctions with standard WordPress import / export tools that are located in Admin -> Tools menu.
  29. I want to add bid button everywhere not only on single auction page? – You can add following code to your functions.php but you will need to style it properly using CSS – https://pastebin.com/fV33s8Gr
  30. How can I enable user registration on login page? – You need to enable that feature in WooCommerce settings.
  31. I have installed your plugin but images are not aligned, buttons are too small / big, input fields needs to be smaller / bigger, can you help? – In short no.

    It’s your duty to modify plugin template to match your style and theme. Themes can implement different ways how they customize pages and parts of WooCommerce. We cannot guarantee that our plugin will look same as in our demo for every possible theme out there. Web developing is more than getting a theme and couple plugins, enabling them and deliver web site. Our templates are coded by standards and they adhere to WordPress and WooCommerce template structure. That means that minimal intervention is needed from client side, but sometimes there is no way to avoid template changes. Some themes use similar structure and have minimal interventions in structure and our plugin looks good out of the box and some do not. It’s your task as web developer and client who purchased plugin to modify and customize plugin templates to match your own (or client’s) needs and styles. This is part of developing a web site. You cannot expect that everything will be perfect for every possible theme and plugin comibation out there or that we will do your job for you as part of support. We support plugin – we do not style and customize client’s sites. Thanks for understanding.

    Note:

    Right way to customize plugin’s templates is to copy contest of plugin_dir/woocommerce-simple-auctions/templates/ directory to your_theme/woocommerce/ directory and do modifications there.

    When you ask us for support make sure it’s not related to tasks we don’t do as part of support:

    – style or customize your theme to do this or that
    – provide support for bugs caused by 3rd party plugins or themes (we can pinpoint that some plugin is problematic)
    – send you CSS or HTML code for modifying html elements

  32. What are custom meta fields for auction product type (useful for CSV Product Import)?
    _auction_item_condition
    _auction_type
    _auction_proxy
    _auction_start_price
    _auction_bid_increment
    _auction_reserved_price
    _auction_dates_from
    _auction_dates_to
    _auction_current_bid
    _auction_current_bider
    _auction_max_bid
    _auction_max_current_bider
    _auction_bid_count
    _auction_closed
    _auction_has_started
    _auction_fail_reason
    _order_id
    _stop_mails
    _auction_wpml_language
    _auction_automatic_relist
    _auction_relist_fail_time
    _auction_relist_not_paid_time
    _auction_relist_duration
    _regular_price (for buy now price!)
    
    Sample CSV file can be downloaded here. You can use Tools -> Import -> WooCommerce products (CSV) importer which imports products to your store via a CSV file.
    _auction_closed values explained:
    
    	
    1 - Auction failed (because there were no bids or auction failed because item did not make it to reserve price)
    
    2 - Normal Auction end - closed with highest bidder winning the auction
    
    3 - Product sold for buy now price
    
    
  33. Is it possible to set proxy auctions on by default for all auctions? – There is option in Auction settings to enable this by default for all auctions. Please check plugin options part of this documentation.
  34. How to remove Simple Auction history tab or any WooCommerce tab in single product (auction) page? – Add code below to your_theme/functions.php (on the bottom):

    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    
    function woo_remove_product_tabs( $tabs ) {
    
        unset( $tabs['simle_auction_history'] );  // Remove auction history tab, typo is ok otherwise code doesn't work
        return $tabs;
    }
    


    To remove other WooCommerce tab(s) code is:

    add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 );
    
    function woo_remove_product_tabs( $tabs ) {
    
        unset( $tabs['tab_name'] );      	// list of tabs can be found in WooCommerce documentation
        return $tabs;
    }
    
  35. I can’t see auctions on shop page? I have defined auction base page and I still don’t see anything?

    If you want auctions on shop page in auctions settings make sure that you have not checked settings “do not mix auctions and regular products”.

    Stock management has to be enabled otherwise you won’t see auctions.

    If you use WPML you need to define auction base page and make its translation in order to see auctions.

    Some rouge plugin that modifies WP query in some weird way. Try disabling all plugins and leave only WooCommerce and Simple auction.

    Poorly coded theme that modifies WP query. Change theme to default one which comes with WordPress to test if that’s the problem.
  36. I want to limit only bid increment not whole bid value? You can limit absolute bid value in Simple Auctions settings. To limit single max bid input you can use this code https://pastebin.com/6SLf3rM5 in your functions.php file.
  37. How can I get refund if I’m not satisfied?

    If you have problem with our items we require that you first get in touch with us so we can try to solve your problem. Our items are extensively tested and we will do everything to help you with problems you might encounter.

    More about how to get refund on Envato can be found here and here.
  38. How can I translate plugin to my language? Do you have translations?

    We only maintain english translation. We do not have resources to quality maintain other translations. If you have trasnlation, you can submit one to us and we will post it here for download if someone wants it, but those will be unofficial.

    Here are steps which can help you to traslate plugin yourself:

    • POT lang file that you will edit is located in:

      plugins/woocommerce-simple-auctions/lang/wc_simple_auctions.pot

    • you need to download and install Poedit https://poedit.net/download
    • download wc_simple_auctions.pot and open it with Poedit
    • do your translations with Poedit and create po/mo files
    • when done save lang file with suffix for your language for example wc_simple_auctions-en_GB.po, saving wc_simple_auctions-en_GB.po will create wc_simple_auctions-en_GB.mo
    • you need to upload both files to /wp-content/languages/plugins/ and not to plugin directory because translations will be lost if you update plugin by deleting old one

    Note:

    In filename wc_simple_auctions-en_GB.po suffix en_GB must match your language settings in WordPress, otherwise language will not be loaded. So for example you can have wc_simple_auctions-en_AU.mo, wc_simple_auctions-af.mo or wc_simple_auctions-en_CA.mo, complete list of available suffixes are here https://make.wordpress.org/polyglots/teams/

  39. Where can I find max proxy bid for auction? In wp-admin -> product details here is screenshot.
  40. Does the user have to be logged in to be able to bid? Why? User has to be logged in because we don’t have reliable way to track its bid(s) otherwise. If you have real auction site at one moment user(s) will have to enter details for shipping, payment etc, it’s also a way to filter serious bidders and block fake accounts.
  41. 3rd party plugin is causing problems? Its developers tell you that we need to fix our plugin? WooCommerce extensions should be transparent – meaning one extension should work with another without introduction of special code that makes them compatible. Imagine what would happen and how much time we would need to spend if we would have to add a bit of compatibility code for every WooCommerce extension that’s out there – we would end up in huge plugin with tons of problems which would be problem to test and debug. That’s why we think every plugin developer should stick to WooCommerce coding standards and APIs (they’re there for that reason) and not require 3rd party developers to code something into their extensions / plugins so that it could work with theirs.
  42. How can I include winner user info in admin auction finished email notification? You would need to copy template \woocommerce-simple-auctions\templates\emails\auction_finish.php to your_theme\woocommerce\emails\auction_finish.php and then add something like this:

    $wining_user_id = get_post_meta( $product_id, '_auction_current_bider', true );
    $user = get_userdata ( $wining_user_id );
    

    you will then have all user info available in that template – https://codex.wordpress.org/Function_Reference/get_userdata
    Please note that auction finished email notification is sent if auction has winner and is success otherwise auction failed notification is sent.
  43. Does it work with currency switching plugins? – We decided to skip currency switching support because each currency switching plugin uses its own hooks which we would have to implement into plugin and maintain through updates. We did some testing and found out that free version of Currency Switcher displays different currecies fine, while paid does not for some reason, Aelia Currency switcher does not work at all and fails with fatal error. It would require significant changes and modifications for us to bid in different currencies (possibly introducing new bugs and problems) so we decided to skip multi currency support for auctions completely because it complicates a lot whole process of bidding and can confuse bidders (for example someone bids $100 another bids 105.55 eur etc). If you need different currency auctions we think it is better to setup whole new auction site for different market / country with its own currency.
  44. Winning badge is hidden behind auction / product thumbnail. What can I do? You need to change z-index for winning badge:

    span.winning {z-index: 1000}
    
  45. Do you offer customization for buyers fee on auctions? – Yes, you can use this code snippet for that https://pastebin.com/rZeRGPU2.
  46. Auction ended but user (bidder) still can see countdown timer? Noticed that time left was out of sync on some computers? – Auctions use server time which is then translated to local time via JavaScript and considering computer’s local time. So auction will be finished on exact time set, however if client (bidder) has wrong clock set (which is rare nowadays since all computers are automatically synced to Internet time) they can see that auction has ended (but it didn’t in fact) or that auction has still going on but in fact has ended). They will try to bid but they will get error message. You need to instruct them to sort their clock issue and set aucto sync to Internet time.

    If we would check server time each second that would be huge performance problem for busy sites and auctions which have a lot of participants and pages would not be cacheable.
  47. How can I show buy now price on category / archive pages? – You can use this code https://pastebin.com/yqvGCrjB in your functions.php
  48. How can I hide usernames in auction history list? – You need to edit template. First copy template woocommerce-simple-auctions\templates\single-product\tabs\auction-history.php to your_theme\woocommerce\single-product\tabs\auction-history.php and edit file in that directory so update doesn’t override your changes.

    Then find and remove lines (or comment them out) 46 and 62-66.

    If you use ajax bid refresh you will need to do one more thing – in \plugins\woocommerce-simple-auctions\classes\class-wc-product-auction.php find and replace get_userdata($history_value->userid)->display_name with preg_replace(“/(?!^).(?!$)/”, “*”, get_userdata($history_value->userid)->display_name) otherwise when ajax update line you will get full username.
  49. I see products out of stock in related products? Why? I want to hide out of stock products from related products! – This is WooCommerce related and not WSA. You have to change WooCommerce setting called “Out of stock visibility” which is located in WooCommerce Settings -> Products -> Inventory tab.
  50. How can I place “add to watchlist” link to product archive page for all auctions? – You can add this code (thx Mike) to your functions.php:

    // display "add to watchlist" on all product archive pages
    add_action( 'woocommerce_shop_loop_item_title', 'add_to_watchlist', 50 );
    function add_to_watchlist() {
        global $product;
        if (isset($product) && $product == true) {
            wc_get_template('single-product/watchlist-link.php');
        }
    }
    
    
  51. I want auction details on product archive page? – You can use this snippet to add for example starting bid, current bid and max bid https://pastebin.com/Jt4DRcXp
  52. I do not use reminder email notification, how can I remove Auction Settings from My Account? – You can do that via custom CSS:
    .woocommerce-MyAccount-navigation-link--auctions-endpoint {display:none}
    or by adding this snippet to functions.php:
    
    add_filter ( 'woocommerce_account_menu_items', 'wpgenieorg_remove_my_account_links', 90);
    function wpgenieorg_remove_my_account_links( $menu_links ){
    	unset( $menu_links['auctions-endpoint'] );
    	return $menu_links;
    }
    
  53. I see two drop down sort boxes? How can I remove one? – You need to find appropriate action and remove it with code something like this:
    remove_action('woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30, 0);
    Note that this action could have custom name because it was usually added by theme devs.
  54. Why orders are not automatically created when user wins auction? – Order is created when winner clicks pay now button. If user does not click on pay now button order will not be created. Once order is created users will see it under My account -> Orders. Before order is created user will see auction on pages where you display my auctions shortcode with pay now button. All winners will also receive email notification pay for auction reminder (how often depends on cronjob setting for cron named mails). In that reminder to pay notification winner will receive pay now link. Along that administrator will receive email notification when auction is finished or failed with info who won auction or why auction failed.
  55. What happens if winner does not want to pay for auction? – You can delete that winning bid and next highest bidder will be winner and will see pay now button for auction. There is auto relist option that can relist auction: “Relist if not paid after n hours”.

    What happens when you manually delete winner (winning bid) and want next highest bidder to become winner? Is email automatically sent? When current highest bidder does not pay and you delete winning bid, mails are not sent automatically to the next highest bidder / winner. You would have to manually contact next higest bidder / winner and send auction url where they can see pay now button and make payment.
  56. Product type column vanished in Woo product list, how can I get it back? – From WooCommerce 3.4.0 update, Woo developers removed that column in product list (as a result of users’ feedback). There is way to restore it back using this plugin https://wordpress.org/plugins/woocommerce-product-type-column/
  57. When I click on bid button page loads slowly. Is there anything that can be done to speed up bid button request? – Sluggish website response (high TTFB times) on bid requests are 99% caused by slow mail server. When you click on bid button two mail notifications are sent (unless you have disabled them) – bid notification for administrator and for customer (and in some cases outbid note). If your mail server is slow, this can be a problem. Another cause might be slow server but in that case all requests will be slow. Email notifications are: outbid note, bid note, Customer bid notification. They can be disabled in WooCommerce Settings -> Emails.
  58. I’m missing sealed bid checkbox in edit product details page but sealed auctions are enabled? – This happens when you have enabled proxy bidding by default for all auctions – then sealed bid option is disabled in product details.
  59. I want to auto refresh page when future auction starts. What should I do? Obsolete – auction is automatically started using ajax.
  60. I want to validate payment method for users / bidders and have role based bidding. What should I do? – We have released WooCommere Simple Auction Role Based Bidding and Payment Method Verification extension for these features you can purchase it here and check its documentation here. Default role should be in above case ‘subscriber’ which then is changed to say ‘customer’. You can create also custom role say ‘bidder’ using some plugin for WordPress role management (like this one User Role Editor). To validate payment and enable user to bid create product with price say $0.01 and set its ID in WooCommere Simple Auction Role Based Bidding and Payment Method Verification extension config.
  61. I want to export order(s) data. How can I do that? – There are plugins that allow exporting of various order data as CSV file which you can then import to some other software you use for order management. We can suggest this plugin Advanced Order Export For WooCommerce.

    There is export for auction activity (CSV) and single auction history (CSV and Excel with sortable columns) in wp-admin.
  62. Do you recommend any credit / wallet plugin for WooCommerce that works with this plugin? – Yes, you can use TeraWallet plugin which adds new credit payment gateway and works with our plugin just fine. Users or admins can top up wallet credit balance with regular payment gateways or manually.
  63. How can I show “Outbidded” message / badge to users who participated in auction? – You can use modified winning-badge.php template to accomplish that. See screenshot.
  64. Is it possible to have proxy and normal bidding on same page? – Yes, we have simple modification for that. Open ticket and we will send you small plugin which allows this behaviour in Simple Auctions plugin.
  65. How can I customize email notification? How can I add auction name to email notification subject? – You can do that using WooCommerce email notification filters. To add content in subject you can use following filter:
    woocommerce_email_subject_ID
    where ID is ID of the email notification. Check https://docs.woocommerce.com/document/change-email-subject-lines/ for complete reference. For example woocommerce_email_subject_auction_finished.

    List of all WooCommerce Simple Auctions email IDs:

    bid_note
    auction_buy_now
    auction_closing_soon
    auction_fail
    auction_finished
    auction_relist_user
    auction_relist
    remind_to_pay
    auction_win
    customer_bid_note
    reserve_fail
    outbid_note
    	
  66. I can’t find sealed / silent auction option? – In order to enable sealed auctions please go to WooCommerce Settings > Auctions and first enable setting called “Enable sealed auctions”. After that you can go and publish auction, in new product screen you will have option to set auction as silent.
  67. Can I relist paid auctions? – From version v2.1.3 you can relist paid auctions. First you need to enable option called “Allow relist of paid auctions” in Woo Settings > Auctions. After that all paid auctions will have relist button.
  68. Can I output template parts using shortcodes? – Yes, from version v2.1.5 you can output parts of single auction template using shortcode [wsa_templates template=”countdown”] – this is useful for all visual builders except for Elementor (for which we have native widgets, but can be used here too). Available parts are:
    add-to-cart
    countdown
    pay
    bid-form
    condition
    dates
    max-bid
    reserve
    auction-sealed
    ajax-conteiner-start
    ajax-conteiner-end
    
    

FAQ for WooCommerce Lottery and Pick Number mod addon

Here you can find answers to frequently asked questions. Feel free to contact us if you can’t find answer to your question.

  1. Can users create their own lotteries? – Basically yes, only users who can add new products can create lotteries. You can use multiple vendor plugin which will allow you to add users who will be able to create products (lotteries). You can use multiple vendor plugin which will allow you to add users who will be able to create lotteries. You can use WooCommerce Product Vendors (there is no frontend submission for lotteries only backend).
  2. Do you use cronjobs? Why do we use cronjobs? – Yes. Please check installation instructions. WordPress cronjob is run on every visit (page load), it’s fine for small and not so busy websites. But sometimes you do not have enough hits (visitors) and lottery will be finished when visitor loads page (and cronjob) instead on its end timestamp. That’s why we use real cronjobs – to make sure your lotteries will end on time. Also on busy websites you need to turn off WordPress cron and create cronjob for it to avoid cron being loaded on every hit and generating performance penalty.
  3. Where can I edit email templates? – Go to WooCommerce > Settings and click on Emails tab.
  4. Does this plugin work with caching plugins? – Yes, W3TC and WP Super Cache work but we advise no caching for logged in users. For example if page cache is enabled widget recently viewed lotteries will not work. Once user is logged in and there is no caching anymore all widgets will work. You can use CDN and browser caching. Our plugin demo website uses WP Super Cache with page caching and browser caching. All of our plugins have same requirements for caching as WooCommerce – check it here https://docs.woocommerce.com/document/configuring-caching-plugins
  5. Can I make theme with WooCommerce Lottery and sell it on ThemeForest? – Sure, just purchase extended licence and you’re good to go. Since the current licenses do not deal with re-selling Items, Envato lets authors to decide whether they grant permission for bundling Items or not. We have the following conditions, and you need to follow them:
    • You cannot redistribute the item “as-is”, even if you modify it or you make a derivative version for another platform
    • You cannot offer the plugin as a stand-alone item
    • You cannot include the plugin separately from your theme in the download package
    • You cannot provide an Item Purchase Code for your customers – Since Envato doesn’t have a “multi-use” or transferable license, your customers are not entitled to receive an Item Purchase Code with your theme and use the plugin separately from your work.
    • Updating the plugin is your own responsibility
    • Since your customers cannot receive updates from us, you need to handle this on your own
    • You need to handle related support requests after your customers or you can instruct them to buy regular licence and ask us for support directly via our CodeCanyon profile (we cannot provide free support for your customers)
  6. I can’t do anything because I get “out of stock message”? – Lottery plugin needs inventory / stock to be enabled. If you have problems all issues should be fixed by upgrading to WooCommerce Lottery v1.1.6
  7. How can I update plugin with new version? Is auto updating possible? – We suggest you to install Envato Marketplace (installation instructions can be found on plugin’s url) plugin for auto update plugin and themes purchased on Envato. Setup is easy. Manual updating can be done by downloading new version of plugin and overwrite old files with new ones or deleting old plugin and installing new one. If you have Pick Number Mod addon login to https://wpgenie.org/my-account/downloads download latest ZIP, then remove old plugin and upload new plugin (ZIP).

    Note:

    If you have modified plugin files (templates) then you need to be careful when updating so you don’t overwrite changes you made and that templates are inside child theme or theme woocommerce/ template folder.

  8. Does WooCommerce Lottery work with WordPress import / export tools? – Yes, you can export and import lotteries with standard WordPress import / export tools that are located in Admin -> Tools menu.
  9. How can I enable user registration on login page? – You need to enable that feature in WooCommerce settings.
  10. I have installed your plugin but images are not aligned, buttons are too small / big, input fields needs to be smaller / bigger, can you help? – In short no.

    It’s your duty to modify plugin template to matchyour style and theme. Themes can implement different ways how they customize pages and parts of WooCommerce. We cannot guarantee that our plugin will look same as in our demo for every possible theme out there. Web developing is more than getting a theme and couple plugins, enabling them and deliver web site. Our templates are coded by standards and they adhere to WordPress and WooCommerce template structure. That means that minimal intervention is needed from client side, but sometimes there is no way to avoid template changes. Some themes use similar structure and have minimal interventions in structure and our plugin looks good out of the box and some do not. It’s your task as web developer and client who purchased plugin to modify and customize plugin templates to match your own (or client’s) needs and styles. This is part of developing a web site. You cannot expect that everything will be perfect for every possible theme and plugin comibation out there or that we will do your job for you as part of support. We support plugin – we do not style and customize client’s sites. Thanks for understanding.

    Note:

    Right way to customize plugin’s templates is to copy contest of plugin_dir/woocommerce-simple-lotteries/templates/ directory to your_theme/woocommerce/ directory and do modifications there.

    When you ask us for support make sure it’s not related to tasks we don’t do as part of support:

    – style or customize your theme to do this or that
    – provide support for bugs caused by 3rd party plugins or themes (we can pinpoint that some plugin is problematic)
    – send you CSS or HTML code for modifying html elements

  11. Where can I see winners of the lottery? – Read text and check screenshots in paragraph “Plugin options”.
  12. How can I add countdown timer / progress bar on all pages (product loop and product archive) not only on single product page? – You can download and install small plugin for that called WooCommere Lottery Progress Bar in Product Loop.

    We have also code snippets for that https://pastebin.com/gavzf7bz and https://pastebin.com/FBwvXp7N You can use code here or the code below:
    add_action( 'woocommerce_after_shop_loop_item_title', 'wpgenie_show_counter_in_loop', 50 );
    
    function wpgenie_show_counter_in_loop(){
    
    	global $product;
    
    	$time = '';
    
    	if(!isset ($product))
    		return;
    	if('lottery' != $product->get_type())
    		return;
    
    	$timetext = __('Time left', 'wc_lottery');
    
    	if(!$product->is_started()){
    		$timetext = __('Starting in', 'wc_lottery');
    		$counter_time = $product->get_seconds_to_lottery();
    	} else{
    		$counter_time = $product->get_seconds_remaining();
    	}
    
    	$time = ''.$timetext.'
    	';
    
    	if($product->is_closed()){
    		$time = ''.__('Lottery finished','wc_lottery').'';
    	}
    	echo $time;
    }
    
  13. How winner(s) is picked? How do you pick winners? – Detailed explanation is here
  14. Can users buy tickets for lotteries without signup / register first? – From Lottery version v2.1.5 login at later stage of checkout (guest checkout) is possible. It is enabled by default in settings and can be disabled.
  15. What are custom meta fields for lottery product type (useful for CSV Product Import)?
    
    _lottery_closed
    _lottery_dates_from
    _lottery_dates_to
    _lottery_multiple_winner_per_user
    _lottery_num_winners
    _lottery_participants_count
    _lottery_price
    _lottery_winners
    _lottery_fail_reason
    _max_tickets
    _max_tickets_per_user
    _min_tickets
    _participant_id
    _lottery_wpml_language
    
  16. 3rd party plugin is causing problems? Its developers tell you that we need to fix our plugin? – WooCommerce extensions should be transparent – meaning one extension should work with another without introduction of special code that makes them compatible. Imagine what would happen and how much time we would need to spend if we would have to add a bit of compatibility code for every WooCommerce extension that’s out there – we would end up in huge plugin with tons of problems which would be problem to test and debug. That’s why we think every plugin developer should stick to WooCommerce coding standards and APIs (they’re there for that reason) and not require 3rd party developers to code something into their extensions / plugins so that it could work with theirs.
  17. How can I translate plugin to my language? Do you have translations? – We only maintain english translation. We do not have resources to quality maintain other translations. Here are steps which can help you to traslate plugin or change some strings yourself:
    • you will use file plugins/woocommerce-lottery/languages/wc_lottery.pot to create your translation
    • you need to download and install Poedit https://poedit.net/download
    • download wc_lottery.pot and open it with Poedit
    • do your translations with Poedit
    • when done save wc_lottery-en_GB.po, saving wc_lottery-en_GB.po will create wc_lottery-en_GB.mo
    • you need to upload both files to /wp-content/languages/plugins/ and not to plugin directory because translations will be lost if you update plugin by deleting old one

    In case you need to replace string lottery with competition please contact us to get PO/MO translation files with changed strings.

    Note:

    In filename wc_lottery-en_GB.po suffix en_GB must match your language settings in WordPress, otherwise language will not be loaded. So for example you can have wc_lottery-en_AU.mo, wc_lottery-af.mo or wc_lottery-en_CA.mo, complete list of available suffixes are here https://make.wordpress.org/polyglots/teams/

  18. I want to remove countdown timer on single lottery page, what should I do? To do that just create empty file called lottery-countdown.php in your_child_theme\woocommerce\global\ folder. If you want to modify or edit element from that template you need to copy its content from original template plugins\woocommerce-lottery\templates\global\lottery-countdown.php to modified one which should be also in your_child_theme\woocommerce\global\lottery-countdown.php folder.
  19. When client cancelled order stock is not restored? – Stock has to be restored, otherwise contact us and open support ticket.
  20. Can I manually add winning numbers? Can I enable users to pick ticket numbers? Can I have question – Yes, you will need Pick ticket numbers addon / extension avaliable (for a fee) – check demo and screenshots – please contact us for more details via ticket system or email [email protected] – features included: ticket pick option, question / answers, manually pick winning number(s) – when you want to use 3rd party lottery drawing option like national lottery numbers, service like random.org or your own random number generator
  21. What happens with tickets with wrong answer? – When you manually select winner you can select also winner with wrong answer. When winner is selected automatically then tickets with wrong answers will not be taken into draw process.
  22. List of actions and filters – Here is list of all actions:
    wc_lottery_close
    wc_lottery_fail
    wc_lottery_min_fail
    wc_lottery_won
    pre_get_lottery_search_form
    woocommerce_product_options_lottery
    lottery_product_save_data
    woocommerce_lottery_do_relist
    woocommerce_lottery_do_extend
    wc_lottery_participate_added
    wc_lottery_participate_not_added
    wc_lottery_participate
    wc_lottery_cancel_participation
    wc_lottery_cancel_participation_failed
    wc_lottery_delete_participate_entry
    woocommerce_refund_processed
    woocommerce_order_partially_refunded
    woocommerce_order_fully_refunded
    woocommerce_lottery_started
    woocommerce_before_shop_loop
    woocommerce_after_shop_loop	
    woocommerce_email_header
    woocommerce_email_footer
    woocommerce_lottery_before_participate
    woocommerce_lottery_ajax_change_participate
    woocommerce_lottery_participate_future
    woocommerce_before_add_to_cart_button
    woocommerce_after_add_to_cart_button
    

    Here is list of all filters:
    woocommerce__lottery_history_data
    woocommerce_lottery_history_heading
    lottery_history_started_text
    lottery_history_starting_text
    lotery_add_participants_from_order
    lotery_remove_participants_from_order
    woocommerce_order_fully_refunded_status
    woocommerce_lottery_participants
    woocommerce_lottery_winners
    woocommerce_lottery_history
    woocommerce_lottery_participating_message
    get_lottery_search_form	
    woocommerce_lottery_bage
    woocommerce_product_add_to_cart_text
    woocommerce_product_single_add_to_cart_text
    woocommerce_lottery_participating_message
    woocommerce_shortcode_lotteries_query
    woocommerce_shortcode_products_query_results
    widget_title
    time_text
    get_lottery_search_form
    woocommerce_email_footer_text
    woocommerce_quantity_input_min
    woocommerce_quantity_input_max
    
    Typos in actions and filters are ok and work.
  23. Refund feature does not work? How can I tell if my payment gateway supports refunds? If you got this error: “Payment does not support refund” your gateway just does not implement refund feature. Here is link for more infos about how to check if gateway supports refund feature. Keep on your mind that for issuing refund you need to click on refund button in product details, there are not automatic refunds.
  24. How can I create custom query for lotteries? You can use this code:
    // Return active lottery products.
    $args = array(
    	
    	'post_type'=> 'product',
    	'show_past_lottery' => FALSE,   
    	'tax_query' => array(array('taxonomy' => 'product_type' , 'field' => 'slug', 'terms' => 'lottery')),    
    );     
    	
    // Return past lottery products.
    $args = array(
    	
    	'post_type'=> 'product',
    	'show_past_lottery' => TRUE,    
    	'tax_query' => array(array('taxonomy' => 'product_type' , 'field' => 'slug', 'terms' => 'lottery')),            
    	'meta_query' => array(
    		array(
    				'key' => '_lottery_closed',
    				'operator' => 'EXISTS',             
    			),
    		),
    );          
    
    $the_query  = new WP_Query( $args );
    
    Also you can check this paste here.
  25. I want to export order(s) data. How can I do that? – There are plugins that allow exporting of various order data as CSV file which you can then import to some other software you use for order management. We can suggest Advanced Order Export For WooCommerce. These plugins work with custom product types which are used in this plugin. There is also option to go to lottery details, scroll down to Lottery history block and literally copy / paste everything to excel or other table calc file.
  26. Can users create their own lotteries like for example on eBay? Can I charge fee for lottery ticket sales published by users? – Yes but you need 3rd party plugin for implementing WooCommerce multivendor / marketplace. Then your users will be able to post lotteries and you can charge fee for their sales. You can use Dokan multivendor plugin which has frontend lottery submissions (you need Business version or Free, Starter, Professional with Dokan WooCommerce Lottery Integration module) or Woo Product Vendors.
  27. Do you recommend any credit / wallet plugin for WooCommerce that works with this plugin? – Yes, you can use TeraWallet plugin which adds new credit payment gateway and works with our plugin just fine. Users or admins can top up wallet credit balance with regular payment gateways or manually. With Pick Number it is possible to custom code feature that instant wins are automatically credited to TeraWallet for winning user.
  28. I’m using pick ticket number mod but do not use tickets only option to manually enter winners. What means number you enter in that case? – When you do not use ticket numbers, number you enter in manual pick is in fact position in array of tickets which is generated when order for ticket is created. Since it is array you can enter 0 which is 1st element from array. Position in participant array is defined by order completed timestamp so orders made earlier will be on the beginning of the array of participants. Base lottery number works same – it just uses mt_rand function to generate number which is then used to choose winner(s).
  29. I’m using pick ticket number mod and I want to know what happens with tickets who have wrong answers? – If you use automatic draw and allow false answers all tickets will get into the draw. If you select “allow only true answers” option then tickets with wrong ones will not get into the draw.
  30. Product type column vanished in Woo product list, how can I get it back? – From WooCommerce 3.4.0 update, Woo developers removed that column in product list (as a result of users’ feedback). There is way to restore it back using this plugin https://wordpress.org/plugins/woocommerce-product-type-column/
  31. How can I hide usernames in lottery history list? – You need to edit template. First copy template woocommerce-lottery\templates\single-product\tabs\lottery-history.php to your_theme\woocommerce\single-product\tabs\lottery-history.php and edit file in that directory so update doesn’t override your changes. Then find and remove / edit lines (or comment them out) 28-39.
  32. I want to relist / extend lottery and keep all current participants? – You can do that using “Extend Lottery” button. Make sure to have latest version of Lottery plugin and once lottery fails (for any reason) you will have both options – to relist it (restart with no participants) and to extend end date keeping all current participants (and their orders). Only failed lotteries can be extended while all finished lotteries can be relisted.
  33. Is there a way when a participant buy the ticket(s) for lottery to make it automatically participate to another one? Is there option when a customer buys a product to make that customer also a participation for a lottery? – No, plugin does not support that feature. However you can issue customer coupon code which they can use to participate in lottery for free, you can use some more advanced coupon code manager like Smart Coupons.
  34. How can manually add order and get ticket numbers assigned? Can I add free of charge order? – For ticket numbers you need Pick Number Mod addon for WooCommerce Lottery. You can add order manually from wp-admin like for regular products or you can use “login as user” plugin and go through checkout process as that particular user you want to add order for (if you want to add order for free you will need to create coupon code you can use to discount order). Also check tutorials with videos https://wpgenie.org/tutorials-category/woocommerce-lottery-with-pick-number-mod-how-to-manually-add-order

    We have new tutorial how to manually add order from WooCommerce Orders > Add New – check it here.
  35. How “Use alphabet?” works in Pick Number mod addon? – When enabled your numbers will be partitioned with A-Z letters using parameter “tickets per tab”. Example you have 1000 tickets and 500 tickets per tab results is parition A1 – A500, B1 – B500. If you do not set “tickets per tab” or enable “randomly assign ticket number” addon divide max number of tickets with 26 and you will have tickets with all 26 letters (for say 7800 tickets last ticket will be Z300, since 26 letters * 300 numbers give 7800 tickets total).
  36. I want to have orders marked as completed automatically, should I use plugin or? – If you set lottery to be virtual and downloadable it will be marked as completed upon successful payment. You don’t need to set file download for downloadable product just leave that part empty. There are also plugins which automatically mark orders as completed.
  37. Can I clone or duplicate lottery product to create new one? – No, lotteries should not be cloned because all custom meta will be cloned too and that can cause issues. You can relist lottery instead. Best way to creatw new lottery is to go add new lottery product from scratch. If you need to automate this please use import tool and consult documentation about custom meta fields (FAQ item no 15).
  38. Lottery accidentally finished and I’m unable to extend it – is there anything I can do to retain all participants and extend lottery end date? – Best would be to refund all users or give them coupon code to enter new lottery for free. Brute force solution (you need to edit values in database or edit custom meta fields using plugin like JSM’s Show Post Metadata!): you can change end date and then remove these custom postmeta for particular lottery product (search by post ID in table wp_postmeta!): _lottery_closed, _lottery_fail_reason, _lottery_winners. Custom postmeta value explanation:

    _lottery_closed values: 1 – fail, 2 – finished

    _lottery_fail_reason: 1 – There were no participants, 2 – The item did not make it to minimum participants
  39. I’m using Lottery Pick Number mod addon and I want to have picture with puzzle instead of question. Is that possible? – Yes it is. Upload picture with your puzzle, add it to question input box using HTML img tag and enter couple of answers marking right one with checkbox. See screeshot below with example code:
    screenshot
  40. I’m using Lottery Pick Number mod addon and I want to auto relist lottery. Is that possible? – Auto relisting is only possible with Pick Number Mod addon. You need to set auto relist parameters and setup cronjob https://domain.com/?lottery-relist=true
    screenshot
  41. How can I create Entry Lists page? – Please read this quick and easy tutorial.
  42. I’m using cache plugin in WordPress with option for object cache – how should I setup it? – If you use object cache you will need to add group wc_lottery to a list of non presistent groups, below is screenshot from W3 Total Cache object cache settings page:
    screenshot
    define( 'WP_REDIS_IGNORED_GROUPS', ['counts', 'plugins', 'wc_lottery'] );
    Other plugins have similar option like https://objectcache.pro/docs/ignoring-groups/ or https://github.com/rhubarbgroup/redis-cache/wiki/Configuration-Options. WP Rocket, WP Super Cache and WP Fastest Cache do not use object cache (only page caching and that should be disabled for logged in users). On some hosting providers it is possible that hosting has set up serverwide object cache (in order to have as much clients as possible on same hardware resources) and if you experience issues you might have to check with your hosting support if something like that is implemented in their hosting enviroment.
  43. How can I sort lotteries in My Account > My Tickets section? – You can use this code snippet https://pastebin.com/6iuzQ2bR
  44. I’m using Lottery Pick Number mod addon and I want to rename ticket numbers to be for example names of football teams: Arsenal, Man Utd, Man City… Can I do that? – Yes, ticket numbers can be renamed using filter. For details please open support ticket.
  45. Does Pick Number Mod addon support instant win number? – Yes, you can define ticket numbers that are instant win numbers (available in Pick Number Mod version v2.3.0). You can download latest version here.
  46. I’m getting fatal error on Edit Lottery > Lottery History block? – Make sure you don’t use WooCommerce Upsell Popup pluign. For some strange reason this plugin destroys $product object Edit Lottery and then our plugin cannot access it anymore hence the error.
  47. List of actions and filters for Pick Number Mod addon – Here is list of all actions:
    
    woocommerce_lottery_duplicate_ticket_in_order_found
    woocommerce_after_adding_extra_info
    remove_participants_if_wrong_answer
    woocomerce_before_relist_lottery
    woocomerce_after_relist_lottery
    wc_delete_lottery_history_csv
    wc_lottery_instant_won
    wc_lottery_before_ticket_numbers
    	
    Here is list of all filters:
    
    woocommerce_lottery_participants
    woocommerce_lottery_get_lottery_participants
    woocommerce__lottery_history_data
    woocommerce_lottery_history_heading
    ticket_number_display_html
    ticket_number_tab_display_html
    lottery_history_started_text
    lottery_history_starting_text
    woocommerce_lottery_export_dir_path
    woocommerce_lottery_export_filename
    woocommerce_lottery_export_fields
    wc_lottery_generate_random_ticket_numbers
    lottery_numbers_to_alphabet_number_per_letter
    change_ticket_numbers_to_alphabet
    wrong_answer_display_item_meta
    woocommerce_lottery_my_tickets_endpoint_query_args
    woocommerce_lottery_my_tickets_past_endpoint_query_args
    woocommerce_lottery_entry_list_query_orderby
    woocommerce_lottery_start_ticket_number
    
    	
  48. I have problems when importing and editing 1000s of instant wins. What can I do? This problem arises due to default value of 1000 for max_input_vars php limit. You need to raise that in php.ini to say 3000.

Black Friday / Cyber Monday 2023

We are running Black Friday / Cyber Monday promo until 28th November 2023 – all items in our store are 25% off and all items on Envato / CodeCanyon are 10% off. You can use coupon code cyber2023 to get the discount applied once you are on checkout page.

Our current versions for plugins: WooCommerce Lottery v2.2.0, Woo Lottery Pick Number Mod addon v2.4.4, Woo Simple Auctions v2.1.4, WooCommerce Group Buy & Deals v1.2.1, WooCommerce Simple Storewide Sale v1.1.8. If you don’t have those versions we recommend you to update.

Display “no results” message when there are no results in WordPress shortcode

How to add custom message for shortcodes when there are no results. This applies to all of our plugins but we will do sample with Auction shortcodes.

function wpg_action_woocommerce_shortcode_products_loop_no_results( $attributes ) {
  echo __( 'No auction(s) found.', 'my-lang' );
}

add_action( 'woocommerce_shortcode_won_auctions_loop_no_results', 'wpg_action_woocommerce_shortcode_products_loop_no_results', 10, 1 );

add_action( 'woocommerce_shortcode_my_active_auctions_loop_no_results', 'wpg_action_woocommerce_shortcode_products_loop_no_results', 10, 1 );

Plugin updates – August 2023

Current versions of plugins in August 2023: WooCommerce Simple Auctions v2.1.3, WooCommerce Lottery v2.1.11, Lottery Pick Number v2.4.3, WooCommerce Group Buy Deals v1.2.0, WooCommerce Simple Bulk Discounts v1.0.11, WooCommerce Simple Storewide Sale v1.1.8.

Before updating make backup (just in case) and read changelog to see what’s updated in new plugin release and decide if you need to update.