Code Snippets

Woodmart bid input fix

Here is a bit of CSS and PHP that makes Auctions for WooCommerce bid input look a bit better in Woodmart Theme. Code should go ...
/ Code Snippets

Salient Theme CSS for bid input

Here is a bit of CSS that makes Auctions for WooCommerce bid input look a bit better in Salient Theme. .auction_form.cart div.quantity { width: auto ...
/ Code Snippets

Bootscore Theme CSS for bid input

Here is a bit of CSS that makes Auctions for WooCommerce bid input look a bit better in Bootscore Theme. input.input-text.qty.bid.text.left {display: inline} .quantity.buttons_added {display: ...
/ Code Snippets

Redirect to the Cart page when winner clicks Pay Now

Redirect to the Cart page instead of going directly to Checkout when winning bidder clicks Pay Now, this code snippet requires Auctions for WooCommerce v2.5 ...
/ Code Snippets

Add user’s won auctions to cart

This is code snippet that adds user's won auctions to cart automatically: add_action( 'template_redirect', 'afw_add_won_auctions_to_cart', 10 ); function afw_add_won_auctions_to_cart() { if ( ! is_admin() && ...
/ Code Snippets

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

To add message if there are no results in shortcode please use code snippet below: function afw_action_woocommerce_shortcode_products_loop_no_results( $attributes ) { echo __( 'No auction(s) found.', ...
/ Code Snippets

Pay Now adds won auction to cart instead going to checkout

Here is modified template where Pay Now button adds won auction to cart rather than going to classic checkout. Template should be placed in your ...
/ Code Snippets

How to increase bid step for bid increment value to be more than 1

In documentation's FAQ item no 3 explains how can you accomplish behaviour where bid increment is going up in steps different than $1 - https://wpinstitut.com/auctions-for-woocommerce-documentation/ ...
/ Code Snippets

Add fee on checkout for auction winner

To add fee on checkout for auction winner you can use code snippet below in your functions.php file. To change percentage of fee just modify ...
/ Code Snippets

Custom page template with custom query

In this post we published quick example of custom query for AfW implemented as page template. You can download example of custom page template called ...
/ Code Snippets

Custom min bid increase based on current bid value

Is there a possibility to have minimal bid increments based on current bid amount? Yes, and you can use this code snippet in your child ...
/ Code Snippets

How can I prevent subscriber role from bidding?

To accomplish that you can use code snippet below: // snippet that prevents bidding based on user role add_filter( 'auctions_for_woocommerce_before_place_bid_filter' , 'afw_prevent_bid_by_user_role' ); function afw_prevent_bid_by_user_role() ...
/ Code Snippets

Automatically create a WC order when the auction ends (with Auctions for WooCommerce)

Alex created code that programmatically creates a WooCommerce order when an auction (with bids) ends (thanks Alex!). You can use it as code snippet in ...
/ Code Snippets

How can I place “Add to Watchlist” link to product archive page for all auctions?

You can add this code (thx Mike) to your child theme functions.php file: // display "add to watchlist" on all product archive pages add_action( 'woocommerce_shop_loop_item_title', ...
/ Code Snippets