Skip to content

Instantly share code, notes, and snippets.

@Oscar-Abad-Folgueira
Last active October 15, 2022 09:28
Show Gist options
  • Save Oscar-Abad-Folgueira/3654784329d3c354ecf321b384227333 to your computer and use it in GitHub Desktop.
Save Oscar-Abad-Folgueira/3654784329d3c354ecf321b384227333 to your computer and use it in GitHub Desktop.
WooCommerce Snippet: Comprobar si WooCommerce está instalado.
<?php
/**
* @snippet WooCommerce Snippet: Comprobar si WooCommerce está instalado.
* @author Oscar Abad Folgueira
* @author_url https://www.oscarabadfolgueira.com
* @snippet_url https://oscarabadfolgueira.com/woocommerce-snippet-comprobar-si-woocommerce-esta-instalado/
*/
if ( class_exists( 'WooCommerce' ) ) {
echo "WooCommerce está instalado. Podemos seguir";
} else {
echo "WooCommerce no está instalado. No puedo seguir. Haz algo, por favor!!";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment