Skip to content

Instantly share code, notes, and snippets.

@kbxian
Created April 7, 2017 23:26
Show Gist options
  • Save kbxian/af3036b0542ba73e9ce6da42b46e7bbb to your computer and use it in GitHub Desktop.
Save kbxian/af3036b0542ba73e9ce6da42b46e7bbb to your computer and use it in GitHub Desktop.
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
// Make sure WooCommerce is active
if ( ! in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) return;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment