-
Easy way to change number of items is to go to WordPress Settings > Reading and change option “Blog pages show at most”. If that does not work for you there are filters which can be used. You will need Competitions for WooCommerce v3.5 in order to get new filters needed for this code snippet. […]
-
In case you need proxy bidding not to reach reserve price instantly ie when reserve price is lower than current bid, next bid will be current bid + min bid increase, you can use code below in your child theme functions.php: add_filter( 'auctions_for_woocommerce_proxy_bid_to_reserve' , '__return_false', 20, 3 );
-
Introduction We received many inquries related to visual builders and compatibility with Auctions for WooCommerce. Since it is almost impossible to support all of them natively we had to find solution that is usable in all of those builders. For that purpose we introduced shortcode called auctions_templates – simple way to display auction related template […]
-
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 to child theme functions.php and style.css function custom_enqueue_script() { $product = wc_get_product( get_the_ID() ); if ( $product && $product->get_type() == 'auction') { wp_add_inline_script( 'wd-woocommerce-quantity', 'jQuery(document).ready(function($) { woodmartThemeModule.$document.off("click", ".plus, .minus"); });'); […]
-
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 !important; border: none; margin: 0 10px 0 0 !important; position: initial !important; opacity: 1 !important; visibility: visible !important; pointer-events: initial !important; float:left !important; } .auction_form .quantity.buttons_added {display: block !important; visibility: […]
-
Introduction Auctions for WooCommerce support REST api from v2.8 and Competitions for WooCommerce support it from v1.0. Here we will show couple of examples how you can use WooCommerce REST api with our plugins. First, we need to set up test / dev enviroment, we need REST client and key that allows us access to […]
-
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: contents} input.plus, input.minus,button.bid_button.button.alt { width: 40px; } button.bid_button.button.alt { margin: 0 0 0 10px; }
-
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 or higher: add_filter( 'auctions_for_woocommerce_pay_now_button' , 'custom_auctions_for_woocommerce_pay_now_button', 10); function custom_auctions_for_woocommerce_pay_now_button( $data ){ global $product; if ( ! $product ) { return $data; } return esc_url( add_query_arg( 'pay-auction', $product->get_auction_id(), wc_get_cart_url() ) ); […]
-
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() && is_user_logged_in() ) { $user_id = get_current_user_id(); $auction_visibility_terms = wc_get_auction_visibility_term_ids(); $product_visibility_in = array( $auction_visibility_terms['sold'] ); $args = array( 'post_type' => 'product', 'posts_per_page' => '-1', 'meta_query' => array( array( 'key' => '_auction_current_bider', […]
-
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.', 'my-custom-language-domain' ); } add_action( 'woocommerce_shortcode_ending_soon_auctions_loop_no_results', 'afw_action_woocommerce_shortcode_products_loop_no_results', 10, 1 ); add_action( 'woocommerce_shortcode_all_user_auctions_loop_no_results', 'afw_action_woocommerce_shortcode_products_loop_no_results', 10, 1 ); For ending_soon_auctions shortcode hook is woocommerce_shortcode_ending_soon_auctions_loop_no_results, in general hook is woocommerce_shortcode_[shortcode_name]_loop_no_results. This is applicable for […]