Skip to content

Instantly share code, notes, and snippets.

@kloon
Created March 27, 2013 07:06
Show Gist options
  • Save kloon/5252338 to your computer and use it in GitHub Desktop.
Save kloon/5252338 to your computer and use it in GitHub Desktop.
WooCommerce backorder status on archive page
<?php
add_action( 'woocommerce_after_shop_loop_item', 'woocoomerce_archive_backorder', 6 );
function woocoomerce_archive_backorder(){
global $product;
if ( $product->backorders_require_notification() && $product->is_on_backorder( 1 ) )
echo '<p class="backorder_notification">' . __( 'Available on backorder', 'woocommerce' ) . '</p>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment