woocommerce_should_send_low_stock_notification

woocommerce_should_send_low_stock_notification

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.9.5

apply_filters('woocommerce_should_send_low_stock_notification') is found 1 times:

  • /includes/class-wc-emails.php line 759
    		 * @param int $product_id - The low stock product id
    		 *
    		 * @since 4.7.0
    		 */
    		if ( false === apply_filters( 'woocommerce_should_send_low_stock_notification', true, $product->get_id() ) ) {
    			return;
    		}
    
    		// If this is a variation but stock is managed at the parent level, use the parent product for the notification.
    		if ( $product->is_type( 'variation' ) && 'parent' === $product->get_manage_stock() ) {
    			$parent_product = wc_get_product( $product->get_parent_id() );