| 1 |
<?php |
| 2 |
/** |
| 3 |
* Query WooCommerce activation. |
| 4 |
* |
| 5 |
* @author Mahdi Yazdani |
| 6 |
* @package Woo Additional Terms |
| 7 |
* @since 1.0 |
| 8 |
*/ |
| 9 |
if (!function_exists('woo_additional_terms_req_notice_error')): |
| 10 |
function woo_additional_terms_req_notice_error() { |
| 11 |
$class = 'notice notice-error'; |
| 12 |
$message = __( 'Woo Additional Terms is enabled but not effective. It requires WooCommerce in order to work.', 'woo-additional-terms' ); |
| 13 |
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message ); |
| 14 |
} |
| 15 |
endif; |
| 16 |
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); |
| 17 |
if ( !is_plugin_active( 'woocommerce/woocommerce.php' ) ) : |
| 18 |
add_action( 'admin_notices', 'woo_additional_terms_req_notice_error' ); |
| 19 |
endif; |