In Stock message not shown
-
I believe there’s a small bug where In Stock message is not displayed upon activation of this plugin. I traced the issue to a test
if (!$product->managing_stock() || !$product->is_on_backorder(1))
, which should be&&
, as per below.public function change_backorder_message($text, $product) { /** * Edits the backorder message to include a custom message or a default * @param string $text * @param WC_Product $product */ if (!$product->managing_stock() && !$product->is_on_backorder(1)) { return; } $backorder_message = get_post_meta( $product->get_id(), "_backorder_message", true ); return !empty($backorder_message) ? $backorder_message : $text; } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘In Stock message not shown’ is closed to new replies.