You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be awesome to add a filter in the is_sold_individually() in WC_Product_Jet_Booking.
This allows people to enable quantity along with the text fields which already have this.
Extending the WC_Product_Jet_Booking brings some unwanted/unexpected behaviour.
Example:
/** * Get type. * * Get internal type. * * @access public * * @return string */publicfunctionget_type() {
return'jet_booking';
}
/** * Is sold individually. * * Check if a product is sold individually (no quantities). * * @access public * * @return boolean */publicfunctionis_sold_individually() {
return apply_filters( 'jet_booking_sold_individually', false, $this ); // <-- Added this filter for is_sold_individually
}
/** * Ger virtual. * * Set product as virtual. * * @access public * * @param string $context What the value is for. Valid values are `view` and `edit`. * * @return bool */publicfunctionget_virtual( $context = 'view' ) {
return apply_filters( 'jet_booking_get_virtual', true, $this ); // <-- Added this filter for get_virtual
}
/** * Is purchasable. * * Returns false if the product cannot be bought. * * @access public * * @return bool */publicfunctionis_purchasable() {
return apply_filters( 'woocommerce_is_purchasable', true, $this );
}
Would really love if this is added, and I think I can make a few people happy after that since we've made a extension which allows customers to use qty together with jet booking..
The text was updated successfully, but these errors were encountered:
Next 3.3.1 release version of the plugin will have such hooks. For is_sold_individually() will be added WC based woocommerce_is_sold_individually hook that used for such purpose. As for get_virtual() there is no default WC hook so in this case will be added jet-booking/wc-integration/booking-product/get-virtual the naming of the hook stands on our naming standards.
I think it would be awesome to add a filter in the
is_sold_individually()
inWC_Product_Jet_Booking
.This allows people to enable quantity along with the text fields which already have this.
Extending the
WC_Product_Jet_Booking
brings some unwanted/unexpected behaviour.Example:
Would really love if this is added, and I think I can make a few people happy after that since we've made a extension which allows customers to use qty together with jet booking..
The text was updated successfully, but these errors were encountered: