Removal of users that have not logged in for more than 6 months to our support

In order to prevent potential security risks and data leaks we will be removing old user data and their tickets from our support. We want to keep user data and user’s info to minimal amounts possible. Users with orders will not be removed and users will have permanent access to downloadable files (free and paid).

This will also enforce support policy where only users who have valid support in Envato will be able to submit tickets. Plugin updates, documentation and free code snippets are and will be available to all users who purchased our plugins no matter of active support status.

ClassicPress – Get Simple Auctions, Lottery and Group Buy running on lightweight WordPress fork

ClassicPress Get Simple Auctions, Lottery and Group Buy running on lightweight WordPress fork

ClassicPress is WordPress long awaited fork of WordPress 4.9 without Gutenberg block editor, basically a lightweight fork of WordPress 4.9 with a few tweaks and improvements. It is under active development, has less bloat and has latest security patches. You will love overall simplicity and speed.

Most popular themes and plugins that work with WordPress 4.9 are compatible with ClassicPress and there are forks of WooCommerce called ClassicCommerce and RankMath called Classic SEO (for more infos see link here).

Setting up prerequisites in ClassicPress

First thing to do when installing one of our plugins on ClassicPress is to decide what version of WooCommerce you will use. ClassicCommerce is fork based on WooCommerce v3.5.3 and usually needs tiny compatibility plugin (get it here) which allows WooCommerce addons to work with ClassicCommerce. We used StoreFront theme.

classicpress-plugins-list
Plugin list in ClassicPress

Another option is regular WooCommerce installation but version that does not include (register) blocks for Gutenberg like WooCommerce v4.8.3 – scroll to the bottom and download version you want from wordpress.net/plugins repository. Once WooCommerce is ready you can install our plugins like you would on normal WordPress website.

Payment gateways tested in ClassicPress

Payment gateway we tested beside those that are preinstalled with WooCommerce is WooCommerce Stripe Gateway version 5.3.0 since that is the latest one that works fine with WooCommerce v4.8.2. Here is sample order done using test card with Stripe GW:

classicpress stripe order using test card plugin woocommerce stripe payment

Using our plugins on ClassicPress

There is no difference in how you use and work with plugins. Everything from documentation applies here. Install it, setup couple of products, make couple of orders and that’s it. Once deal, auction or lottery ends you and users will get notifications (if that is set), normal workflow is not affected in any way.

WooCommerce Lottery with Pick Number Mod addon
WooCommerce Lottery with Pick Number Mod addon

Here is screenshot of how auction product looks like:

ClassicPress with WooCommerce Simple Auction auction single product page

And screenshot with WooCommerce Group Buy / Deals product:

classicpress group buy deal product
Group Buy / Deal single product page

Hooks Visual Guide – WooCommerce Single Product Page Actions

Hooks visual guide will help you customize your WooCommerce pages by rearranging elements or adding additional features on single product page. Template hooks are convenient for customizing templates of our plugins like Simple Auctions, Lottery and Group Buy. Easily move and rearrange page elements like progress bar, buy now, texts, countdown timers etc. since all elements are hooked onto existing WooCommerce template hooks (both for single product and for product archive elements).

Here is one example of how to run a shortcode (for our WooCommerce Lottery Pick Number addon) just above buy button on single product page:

add_action( 'woocommerce_after_add_to_cart_quantity', 'wpgenie_add_shortcode_lottery_lucky_dip_buton', 40 );

function wpgenie_add_shortcode_lottery_lucky_dip_buton(){

	echo do_shortcode( '[lottery_lucky_dip_buton qty="5" label="buy 5 tickets"]' );
}

WooCommerce Hooks Visual Guide

Best visual WooCommerce hook (both template and other) guide can be found here – by clicking on each page you will see how hooks are arranged through every WooCommerce page:

WooCommerce Single Product Page Hooks Visual Guide

This is complete list of template hooks:

<?php
/**
 * WooCommerce Template Hooks
 *
 * Action/filter hooks used for WooCommerce functions/templates.
 *
 * @author 		WooThemes
 * @category 	Core
 * @package 	WooCommerce/Templates
 * @version     2.1.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

add_filter( 'body_class', 'wc_body_class' );
add_filter( 'post_class', 'wc_product_post_class', 20, 3 );

/**
 * WP Header.
 *
 * @see  wc_generator_tag()
 */
add_action( 'get_the_generator_html', 'wc_generator_tag', 10, 2 );
add_action( 'get_the_generator_xhtml', 'wc_generator_tag', 10, 2 );

/**
 * Content Wrappers.
 *
 * @see woocommerce_output_content_wrapper()
 * @see woocommerce_output_content_wrapper_end()
 */
add_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
add_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );

/**
 * Sale flashes.
 *
 * @see woocommerce_show_product_loop_sale_flash()
 * @see woocommerce_show_product_sale_flash()
 */
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_show_product_loop_sale_flash', 10 );
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_sale_flash', 10 );

/**
 * Breadcrumbs.
 *
 * @see woocommerce_breadcrumb()
 */
add_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 );

/**
 * Sidebar.
 *
 * @see woocommerce_get_sidebar()
 */
add_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );

/**
 * Archive descriptions.
 *
 * @see woocommerce_taxonomy_archive_description()
 * @see woocommerce_product_archive_description()
 */
add_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
add_action( 'woocommerce_archive_description', 'woocommerce_product_archive_description', 10 );

/**
 * Products Loop.
 *
 * @see woocommerce_result_count()
 * @see woocommerce_catalog_ordering()
 */
add_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 );
add_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 );
add_action( 'woocommerce_no_products_found', 'wc_no_products_found' );

/**
 * Product Loop Items.
 *
 * @see woocommerce_template_loop_product_link_open()
 * @see woocommerce_template_loop_product_link_close()
 * @see woocommerce_template_loop_add_to_cart()
 * @see woocommerce_template_loop_product_thumbnail()
 * @see woocommerce_template_loop_product_title()
 * @see woocommerce_template_loop_category_link_open()
 * @see woocommerce_template_loop_category_title()
 * @see woocommerce_template_loop_category_link_close()
 * @see woocommerce_template_loop_price()
 * @see woocommerce_template_loop_rating()
 */
add_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 );
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 );
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
add_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 );
add_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10 );

add_action( 'woocommerce_before_subcategory', 'woocommerce_template_loop_category_link_open', 10 );
add_action( 'woocommerce_shop_loop_subcategory_title', 'woocommerce_template_loop_category_title', 10 );
add_action( 'woocommerce_after_subcategory', 'woocommerce_template_loop_category_link_close', 10 );

add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 );
add_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );

/**
 * Subcategories.
 *
 * @see woocommerce_subcategory_thumbnail()
 */
add_action( 'woocommerce_before_subcategory_title', 'woocommerce_subcategory_thumbnail', 10 );

/**
 * Before Single Products Summary Div.
 *
 * @see woocommerce_show_product_images()
 * @see woocommerce_show_product_thumbnails()
 */
add_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );
add_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );

/**
 * After Single Products Summary Div.
 *
 * @see woocommerce_output_product_data_tabs()
 * @see woocommerce_upsell_display()
 * @see woocommerce_output_related_products()
 */
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );

/**
 * Product Summary Box.
 *
 * @see woocommerce_template_single_title()
 * @see woocommerce_template_single_rating()
 * @see woocommerce_template_single_price()
 * @see woocommerce_template_single_excerpt()
 * @see woocommerce_template_single_meta()
 * @see woocommerce_template_single_sharing()
 */
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );

/**
 * Reviews
 *
 * @see woocommerce_review_display_gravatar()
 * @see woocommerce_review_display_rating()
 * @see woocommerce_review_display_meta()
 * @see woocommerce_review_display_comment_text()
 */
add_action( 'woocommerce_review_before', 'woocommerce_review_display_gravatar', 10 );
add_action( 'woocommerce_review_before_comment_meta', 'woocommerce_review_display_rating', 10 );
add_action( 'woocommerce_review_meta', 'woocommerce_review_display_meta', 10 );
add_action( 'woocommerce_review_comment_text', 'woocommerce_review_display_comment_text', 10 );

/**
 * Product Add to cart.
 *
 * @see woocommerce_template_single_add_to_cart()
 * @see woocommerce_simple_add_to_cart()
 * @see woocommerce_grouped_add_to_cart()
 * @see woocommerce_variable_add_to_cart()
 * @see woocommerce_external_add_to_cart()
 * @see woocommerce_single_variation()
 * @see woocommerce_single_variation_add_to_cart_button()
 */
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
add_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );
add_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );
add_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );
add_action( 'woocommerce_external_add_to_cart', 'woocommerce_external_add_to_cart', 30 );
add_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 10 );
add_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );

/**
 * Pagination after shop loops.
 *
 * @see woocommerce_pagination()
 */
add_action( 'woocommerce_after_shop_loop', 'woocommerce_pagination', 10 );

/**
 * Product page tabs.
 */
add_filter( 'woocommerce_product_tabs', 'woocommerce_default_product_tabs' );
add_filter( 'woocommerce_product_tabs', 'woocommerce_sort_product_tabs', 99 );

/**
 * Additional Information tab.
 *
 * @see wc_display_product_attributes()
 */
add_action( 'woocommerce_product_additional_information', 'wc_display_product_attributes', 10 );

/**
 * Checkout.
 *
 * @see woocommerce_checkout_login_form()
 * @see woocommerce_checkout_coupon_form()
 * @see woocommerce_order_review()
 * @see woocommerce_checkout_payment()
 */
add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 );
add_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );
add_action( 'woocommerce_checkout_order_review', 'woocommerce_order_review', 10 );
add_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );

/**
 * Cart widget
 */
add_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_button_view_cart', 10 );
add_action( 'woocommerce_widget_shopping_cart_buttons', 'woocommerce_widget_shopping_cart_proceed_to_checkout', 20 );

/**
 * Cart.
 *
 * @see woocommerce_cross_sell_display()
 * @see woocommerce_cart_totals()
 * @see woocommerce_button_proceed_to_checkout()
 */
add_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' );
add_action( 'woocommerce_cart_collaterals', 'woocommerce_cart_totals', 10 );
add_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 );

/**
 * Footer.
 *
 * @see  wc_print_js()
 * @see woocommerce_demo_store()
 */
add_action( 'wp_footer', 'wc_print_js', 25 );
add_action( 'wp_footer', 'woocommerce_demo_store' );

/**
 * Order details.
 *
 * @see woocommerce_order_details_table()
 * @see woocommerce_order_again_button()
 */
add_action( 'woocommerce_view_order', 'woocommerce_order_details_table', 10 );
add_action( 'woocommerce_thankyou', 'woocommerce_order_details_table', 10 );
add_action( 'woocommerce_order_details_after_order_table', 'woocommerce_order_again_button' );

/**
 * Auth.
 *
 * @see woocommerce_output_auth_header()
 * @see woocommerce_output_auth_footer()
 */
add_action( 'woocommerce_auth_page_header', 'woocommerce_output_auth_header', 10 );
add_action( 'woocommerce_auth_page_footer', 'woocommerce_output_auth_footer', 10 );

/**
 * Comments.
 *
 * Disable Jetpack comments.
 */
add_filter( 'jetpack_comment_form_enabled_for_product', '__return_false' );

/**
 * My Account.
 */
add_action( 'woocommerce_account_navigation', 'woocommerce_account_navigation' );
add_action( 'woocommerce_account_content', 'woocommerce_account_content' );
add_action( 'woocommerce_account_orders_endpoint', 'woocommerce_account_orders' );
add_action( 'woocommerce_account_view-order_endpoint', 'woocommerce_account_view_order' );
add_action( 'woocommerce_account_downloads_endpoint', 'woocommerce_account_downloads' );
add_action( 'woocommerce_account_edit-address_endpoint', 'woocommerce_account_edit_address' );
add_action( 'woocommerce_account_payment-methods_endpoint', 'woocommerce_account_payment_methods' );

More details are here.

Problem when accessing support with Envato credentials

We have identified problem when accessing support system using Envato credentials. In case you experienced issues during access please contact us to open account for you so you can get proper access to support and be able to open support tickets.

Problem is manifested as loop during login ie no redirection to open ticket form after login via Envato due to JS error.

WooCommerce Lottery – Give ticket for free when client purchase another item

We had couple of inquries for WooCommerce Lottery if it is possible to give ticket for free and allow clients to participate in prize draw when they purchase regular items sold on websites. This is possible and relatively easy to setup using our plugin. If you want to give users ticket number you will need Pick Number Mod addon for WooCommerce Lottery.

Easiest and fastest solution, would be that you create new lottery product and treat it as regular simple product so when someone purchase it you will ship actual item, (or give user access for download, etc) but also state that user will participate in lottery and could win a prize after purchase.

It is possible to change text from “Participate now for” via translations to anything you like and thing might be more suitable.

That lottery product was setup like this (here we use only WooCommerce Lottery without Pick Number Mod addon in this example):

If you want more complex solution then you will need 3rd party plugin which implements Buy One, Get One Free option / feature for WooCommerce.

In this tutorial I used PW WooCommerce BOGO Free plugin which is really trivial to setup and use. After installation you need to publish promotion and for each purchase of regular product you can add lottery ticket for free if price is lower or equal to product you purchased. There are plenty of similar plugins which you can use for this purpose – all should work just fine.

Here are couple of screenshots to see how this looks like on website during checkout:

Please note that you need to manually add lottery ticket to cart, plugin does not add it automatically. This implementation is handy if you want to use question / answers.

On last screenshot you can see how sample lottery / prize draw was setup. Please note WooCommerce Lottery and Pick Number Mod addon are enabled in this test setup.

Important thing to setup is minimum number of tickets for draw to be done, max number of tickets can be increased or decreased whole time during lottery active phase but make sure you don’t set max tickets below number of sold tickets since that can result with unexpected behaviour.

Keep on your mind that with this solution users would be able to participate by buying lottery ticket directly since we have not implemented anything that would prevent purchasing ticket directly by going to lottery product single page. If you need lottery to be restricted only for those who purchase something else you might need to get different plugin for “Buy One, Get One Free” or get pro version for this plugin.

Now here you can see screenshots of implementation without Pick Number Mod addon. Key difference is that there is no ticket number and that draw will be automatically done once lottery ends (no manual pick winner option – plugin will do that automatically using mt_rand function from all participants – there will always be 1 winner if there is at least 1 participant).

WooCommerce Simple Auctions now with Elementor support

elementor

WooCommerce Simple Auctions supports Elementor from version v2.0. You can create single auction page and auction base page with Elementor using Elementor widgets that are auction specific (bid input, countdown timer, buy now price, etc). To edit auction templates with Elementor you need Elementor (free) plus Elementor Pro (paid) or PRO Elements (free).

How can you create single auction page template with Elementor?

To do that you need to go to Add New Template and then select type Single Auction, enter name and you are good to go to designing Elementor template.

Screenshots below show Elementor widgets you can use for designing your templates:

Easiest way to create your single auction page with Elementor is to create new template for single product. There you can now add, rearrange and style Simple Auction elements like countdown, auction history, auction dates, auction max bid (for proxy), auction reserve price, sealed bid auction elements and auction bid form. Add to cart widget is used for Buy Now button.

From version v2.1.0 we have added Latest Bids Elementor widget which displays auction name, latest bid and time when bid was placed along with featured auction image.

Latest (recent) bids widget

To create auction archive / auction base page you will need to create new template type “Auctions Archive”. This template will be shown on the page you set for Auctions Base Page in Woo Settings > Auctions. Screenshot is below:

To create auction base page you will need to create new template type “Auctions Archive”

Once template is designed you need to publish template and add condition as per screenshots below:

Add condition for Single Auction page template
Add condition for Auctions Archive / Auctions base page template

In Elementor Settings -> Experiments make sure that beta option “Landing Pages” is set to “inactive” otherwise you will have issues with lottery base page. See screenshot below:

Make sure to disable Landing Pages experiment.

If you miss WordPress widgets when searching widgets in Elementor you might need to disable this experiment – Hide native WordPress widgets from search results. This option is located in Elementor Settings – Experiments (and was introduced in Elementor version 3.5.0 so if you have older version you will not have this issue). See screenshot below.

If you need native WordPress widgets – enable this option.

Make sure to check our article about Elementor Loop Templates Performance Issues since this could slow down your site. This is new feature in Elementor which should be used with special care and avoided if possible.

Adding lottery countdown timer and progress bar to product archive / loop

We got quite a few inquries to display countdown timer and progress bar not only on single lottery page but in product archive / loop. This is covered in our documentation, FAQ item no 12 but we also made handy little plugin which enables those two code snippets with just few clicks and no need to edit functions.php file. You can download it here.

End result is shown on screenshot below. Plugin can be your base for further customizations.