-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Bid Pricing #98
Conversation
Holy cannoli this is so cool 😍 |
*/ | ||
public function get_product_type( int $product_id ): ?string { | ||
$valid = [ 'bids', 'rewards' ]; | ||
$categories = get_the_terms( $product_id, 'product_cat' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any value of using a PHP const
for product_cat
? Or is that something that will always stay the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, product_cat
is defined by WooCommerce, and they do not use a constant. I'm not sure how much benefit it will have to define our own, but I think it's pretty safe to say it will never change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href="<?php echo esc_url( $button_url ); ?>" class="wp-block-button__link wp-element-button"> | ||
<?php esc_html_e( 'Bid Now', 'goodbids' ); ?> | ||
<a href="<?php echo esc_url( $bid_now->get_button_url() ); ?>" class="wp-block-button__link wp-element-button"> | ||
<?php echo wp_kses_post( $bid_now->get_button_text() ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran into the checkout error when I was working on #65 and believe I have it fixed in that branch. Good catch!
Summary
This PR implements the Bid auto-increment feature when a bid is successfully placed on an Auction, the Bid Product price will increment by the Bid Increment amount, ready for the next bid.
It also includes a Meta Box on the Order Detail page that shows the Related Auction and Reward Product details.
Issues
Testing Instructions
Screenshots
Order Auction Info Meta Box