Hi! You can send screenshot with plugin configuration, general and product.
Regards
Not working correctly for variations with all back order and notify customer and allow backorder options.
- When there is a variation in stock then the estimated delivery time does not show for the backordered out of stock items. So all variations need to be out of stock to show.
- Cannot check to set the Overwrite general settings options on the page. Reverts to general settings.
What I’ve noticed is that the calculations differ depending on whether they’re done on the product page or in the cart. On the product page, the variation is used to determine stock or backorder, while in the cart, the parent product is used, which is why the dates come out differently.
So I’ve decided to unify this. I’m not sure if this is the right approach, but here’s what I’ve done:
function edw_display_cart_item( $item_data, $cart_item ) {
$product_id = $cart_item['product_id'];
$variation_id = isset($cart_item['variation_id']) && $cart_item['variation_id'] ? $cart_item['variation_id'] : null;
//Se define el id correspondiente
$effective_product_id = $variation_id ? $variation_id : $product_id;
$date = $this->edw_show_message($effective_product_id, true);
y luego en edw_show_message:
function edw_show_message($productParam = false, $separed = false){
.....
if(isset($_POST['type']) and $_POST['type'] == 'variation') {
$product_id = $product->get_parent_id();
}else{
if($product) {
$product_id = $product->get_id();
}else{
$product_id = false;
}
}
//Se define el product_id correspondiente para los datos de las fechas
$product_id = $product->is_type('variation') ? $product->get_parent_id() : $product->get_id();
Hi! You can open a pull request on GitHub with your change and I check this.
Currently I don’t have time to add functionality, but I can check your changes and update the plugin if it’s ok.