• 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 “Auctions Example Template” here. Screenshot explains how to set it in WordPress editor. Code in example is basic one (but working) you will probably need to customize the code match […]
  • 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 theme functions.php or via Code Snippets plugin. function afw_bid_value_classes( $metadata, $object_id, $meta_key, $single ) { if ( isset( $meta_key ) && '_auction_bid_increment' === $meta_key ) { $product = wc_get_product( $object_id […]
  • How can I prevent subscriber role from bidding?

    To accomplish that you can use code snippet below: /* Code snippet that prevents bidding based on user role Add to your functions.php */ add_filter( 'auctions_for_woocommerce_before_place_bid_filter' , 'afw_prevent_bid_by_user_role' ); function afw_prevent_bid_by_user_role() { $current_user = wp_get_current_user(); if ( in_array ( 'subscriber', $current_user->roles ) ){ wc_add_notice( esc_html__('Your user role cannot bid.', 'auctions-for-woocommerce'), 'error' ); return FALSE; } […]
  • 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 your functions.php or as standalone plugin. Download it here https://github.com/f2pnt8/WooCommerce-Create-Order-on-Auction-End.
  • 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', 'add_to_watchlist', 50 ); function add_to_watchlist() { global $product; if (isset($product) && $product == true) { wc_get_template('single-product/watchlist-link.php'); } }