Skip to content

Commit

Permalink
Auction Custom Fields (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
bd-viget authored Dec 14, 2023
1 parent c4fd7dc commit 019d699
Show file tree
Hide file tree
Showing 5 changed files with 258 additions and 43 deletions.
19 changes: 17 additions & 2 deletions client-mu-plugins/goodbids/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,30 @@ Returns the auction post type slug.
`goodbids()->auctions->get_setting( string $setting, int $auction_id )`
Returns a setting value for an auction. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->get_prize_product_id( int $auction_id )`
Returns the Auction's Prize Product ID. If `$auction_id` is not provided, the current post ID will be used.
`goodbids()->auctions->get_reward_product_id( int $auction_id )`
Returns the Auction's Reward Product ID. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->get_estimated_value( int $auction_id )`
Returns the Auction Reward's Estimated Value. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->get_start_date_time( int $auction_id )`
Returns the Auction's Start Date/Time in MySQL format. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->has_started( int $auction_id )`
Checks if the Auction has started. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->get_bid_increment( int $auction_id )`
Returns the Auction's Bid Increment value. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->get_starting_bid( int $auction_id )`
Returns the Auction's Starting Bid value. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->calculate_starting_bid( int $auction_id )`
Returns the Auction's Calculated Starting Bid value, which will use the Bid Increment if the Starting Bid is not set. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->get_goal( int $auction_id )`
Returns the Auction's Goal value. If `$auction_id` is not provided, the current post ID will be used.

`goodbids()->auctions->get_expected_high_bid( int $auction_id )`
Returns the Auction's Expected High Bid value. If `$auction_id` is not provided, the current post ID will be used.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
"key": "group_6570c1fa76181",
"title": "Auction Settings",
"fields": [
{
"key": "field_6570c1fb429a8",
"label": "Auction Start",
"name": "auction_start",
"aria-label": "",
"type": "date_time_picker",
"instructions": "",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"display_format": "m\/d\/Y g:i a",
"return_format": "Y-m-d H:i:s",
"first_day": 0
},
{
"key": "field_657334958904f",
"label": "Auction Product",
Expand All @@ -12,7 +30,7 @@
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"width": "50",
"class": "",
"id": ""
},
Expand All @@ -23,7 +41,7 @@
"publish"
],
"taxonomy": [
"product_cat:prizes"
"product_cat:rewards"
],
"return_format": "object",
"multiple": 0,
Expand All @@ -33,22 +51,26 @@
"bidirectional_target": []
},
{
"key": "field_6570c1fb429a8",
"label": "Auction Start",
"name": "auction_start",
"key": "field_6579fb39bce91",
"label": "Estimated Value",
"name": "estimated_value",
"aria-label": "",
"type": "date_time_picker",
"type": "number",
"instructions": "",
"required": 1,
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"width": "50",
"class": "",
"id": ""
},
"display_format": "m\/d\/Y g:i a",
"return_format": "Y-m-d H:i:s",
"first_day": 0
"default_value": "",
"min": "",
"max": "",
"placeholder": "",
"step": "",
"prepend": "$",
"append": ".00"
},
{
"key": "field_657334728904e",
Expand All @@ -60,7 +82,7 @@
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"width": "50",
"class": "",
"id": ""
},
Expand All @@ -72,6 +94,28 @@
"prepend": "$",
"append": ".00"
},
{
"key": "field_6579e95a0278a",
"label": "Starting Bid",
"name": "starting_bid",
"aria-label": "",
"type": "number",
"instructions": "If left empty, starting bid will default to Bid Increment value.",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "50",
"class": "",
"id": ""
},
"default_value": "",
"min": "",
"max": "",
"placeholder": "(Optional)",
"step": "",
"prepend": "$",
"append": ".00"
},
{
"key": "field_657334428904d",
"label": "Auction Goal",
Expand All @@ -82,7 +126,29 @@
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"width": "50",
"class": "",
"id": ""
},
"default_value": "",
"min": "",
"max": "",
"placeholder": "",
"step": "",
"prepend": "$",
"append": ".00"
},
{
"key": "field_6579fb64bce92",
"label": "Expected High Bid",
"name": "expected_high_bid",
"aria-label": "",
"type": "number",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "50",
"class": "",
"id": ""
},
Expand All @@ -108,11 +174,11 @@
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"instruction_placement": "field",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1702079254,
"modified": 1702493167,
"private": true
}
Loading

0 comments on commit 019d699

Please sign in to comment.