Skip to content

Instantly share code, notes, and snippets.

@felipegenuino
Created May 26, 2020 05:05
Show Gist options
  • Save felipegenuino/ed02076088a11d9bbcaaf0f6d43d8193 to your computer and use it in GitHub Desktop.
Save felipegenuino/ed02076088a11d9bbcaaf0f6d43d8193 to your computer and use it in GitHub Desktop.
[Frontend] WooCommerce: Ultimos produtos
<?php //wp-looping
global $product;
$product = wc_get_product();
?>
<?php if($product->get_stock_quantity() <= $product->get_low_stock_amount() ) : ?>
<span class="courses-and-events__list__card__badge">ÚLTIMAS VAGAS</span>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment