WC-Local-Pickup / woocommerce-local-pickup-time

Adds an option to the WooCommerce checkout pages for Local Pickup that allows the user to choose a pickup time.
https://wordpress.org/plugins/woocommerce-local-pickup-time-select/
29 stars 17 forks source link

Override pickup delay option on products #58

Open keytronic opened 5 years ago

keytronic commented 5 years ago

it would be great to be able to override default pickup delay for some products. I'm dealing with several type of products : 80% need 1 day to be packed but some others are already done (or can be done in few minutes) and could be pickup after 2 hours. And at the opposite some others need more then 2/3 days.

timnolte commented 5 years ago

@JordanGout are you thinking that products would have their own pickup time requirements which dictate the entire order's pickup time or an order would have multiple pickup times by product?

keytronic commented 5 years ago

@timnolte I think order's pickup time should be the maximum time of order's products. If one product can be ready in few hours but another in 2 days order can be pickup in 2 days

keytronic commented 5 years ago

@timnolte I'm thinking about something else it is possible to be able to set delay on product's variations? 🤔 A bakery exemple : cake for 4 people / 6 people can be available in 2 hours but cake for 8 or 10 people in 1day

timnolte commented 5 years ago

I'll have to see where I can take this. Currently the pickup date is only an order meta field, not tied to a product in any way.

jottesjs commented 4 years ago

I vote for this one.

jottesjs commented 4 years ago

Related to this: Some products are only available at specific days. E.g. a bakery, producing special bred xy only on Fridays, so you only can pick up on Fridays and Saturdays, but you have to place your order on Thursday or earlier, to make sure your product ordered for Saturday will be taken from the production of Friday (and not be eventually sold out before the order is processed).

keytronic commented 4 years ago

@timnolte I'm trying to implement this feature. As I need to make options on product variations I use woocommerce_product_after_variable_attributes hook.

The only problem is related to plugin init. Product variations use AJAX but plugin do not load admin if call is from AJAX.

if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { ... }

Can I safely remove this condition ? or maybe there is a way I didn't know. Last part not relevant anymore in 2024 :)

keytronic commented 1 month ago

@timnolte Would you accept PR on this topic? I made the change add pickup time on single product and variations