title: How can I display text message if woocommerce quantity input is greater than stock quantity?
body: <p>I would like to display a custom text message to notify customers that their selected input quantity (prior to clicking the "Add to Cart" button). This message will appear if the selected quantity is greater than the existing available stock quantity, right above the quantity selection within the individual product page. For example:</p>
  
  <pre><code>Existing Stock Quantity: 2
  User Selects: &gt;2
  </code></pre>
  
  <p>In such a scenario, I would like to tell the customer something like: "Your selected order quantity is greater than our existing stock. Please expect a delay of up to 2 weeks for our stock to be replenished."</p>
  
  <p>I've tried to add the custom code into Code Snippets which looks something like that:</p>
  
  <pre><code>function display_order_quantity_exceeds_stock_quantity_text( $message, $product ) {
  
  if( $product-&gt;woocommerce_quantity_input() &gt; $product-&gt;get_stock_quantity()) {
      $message = "Your selected order quantity is greater than our existing stock. Please expect a delay of up to 2 weeks for our stock to be replenished.";
  }
  return $message;
  </code></pre>
  
  <p>}</p>
  
  <p>Does anyone know how I can obtain the woocommerce_quantity_input and get this to work?</p>
  
  <p><strong>Would prefer to have the solution just by adding a function into Code Snippets, rather than using Javascript (if possible).</strong></p>