Add an item condition in Auctions for WooCommerce when the choices in the auction editor do not describe your item. This example adds Refurbished alongside the existing choices.
Note:
This is a developer-level doc. If you are unfamiliar working with code and resolving potential conflicts, we recommend you work with a Woo Agency Partner for larger projects, or find a WooCommerce developer on Codeable for smaller customization work. We are unable to provide support for customization under our Support Policy.
Before you start
↑ Back to topUse a test store with Auctions for WooCommerce active. You need a site-specific plugin or equivalent custom PHP setup, and an unpublished auction to test the new option.
Register the item condition
↑ Back to topIn your custom PHP, add the following filter. The array key is the stored value and the text is what users see. Use a key that does not already exist to keep the current choices.
add_filter(
'auctions_for_woocommerce_item_condition',
static function ( array $conditions ): array {
$conditions['refurbished'] = 'Refurbished';
return $conditions;
}
);
Check the condition on an auction
↑ Back to topOpen an auction product. In Product data > Auction, select Refurbished in Item condition, then save. Preview the auction and confirm that the condition appears. If the option is missing, check that your custom PHP is active on the test store. To undo the change, choose another condition on affected auctions first, then remove the filter.
Questions and support
↑ Back to topSomething missing from this documentation? Still have questions and need assistance?
- If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
- If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.