Hooks & Integration
The following hooks are present in plugin 4.0.0. They are a focused integration reference rather than an exhaustive list.
Bid hooks
Section titled “Bid hooks”| Hook | Arguments / purpose |
|---|---|
woocommerce_simple_auctions_before_place_bid |
$product_id, $bid, $product_data; runs before later eligibility checks. |
woocommerce_simple_auctions_before_place_bid_filter |
Receives $product_data; returning strict false stops the attempt. |
woocommerce_simple_auctions_place_bid_value |
$value, $product_id; filters the normalized submitted amount. |
woocommerce_simple_auctions_place_bid |
One array containing product_id; ordinary bids also provide is_proxy_bid. |
woocommerce_simple_auctions_place_sealedbid |
One array containing product_id, bid, current_user, and log_id. |
woocommerce_simple_auctions_log_bid |
$log_bid_id, $product_id, $bid, $current_user. |
The before-bid action indicates an attempt, not acceptance. Do not send a successful-bid confirmation from that action. Sealed hooks contain confidential values; keep them out of public responses and public logs.
Example: react to an accepted bid
Section titled “Example: react to an accepted bid”/** * Notify a local integration of an accepted auction bid. * * @param array $data Accepted bid context. */function wpgenie_handle_auction_bid( $data ) { $product_id = isset( $data['product_id'] ) ? absint( $data['product_id'] ) : 0;
if ( ! $product_id ) { return; }
do_action( 'wpgenie_auction_bid_accepted', $product_id );}add_action( 'woocommerce_simple_auctions_place_bid', 'wpgenie_handle_auction_bid' );Settings and account forms
Section titled “Settings and account forms”woocommerce_woocommerce_simple_auctions_get_sectionsfilters settings sections.woocommerce_simple_auctions_auctions_settings_form_start,woocommerce_simple_auctions_auctions_settings_form, andwoocommerce_simple_auctions_auctions_settings_form_endextend the customer preferences form.- Shortcode tags in the registered shortcode map can be filtered through
{$shortcode}_shortcode_tag.
Integrations must still validate their own input, check permissions, and escape output. Do not reproduce the bidding engine by writing bid metadata directly.
Legacy integrations
Section titled “Legacy integrations”New integrations should use the maintained woocommerce_simple_auctions_ hooks above. The Simple Auctions package forwards selected older hooks through Simple_Auctions_Deprecated_Hooks; subscribed deprecated hooks can emit WordPress deprecation notices.
Compatibility is event-specific. Do not assume every historical hook has an equivalent payload or timing. In particular, the old woocommerce_simple_auction_delete_bid event is not mapped to the bulk-delete event. Review custom callbacks against the current package and test their arguments before upgrading.