require_once YITH_YWGC_DIR . 'lib/class.ywgc-gift-card.php'; require_once YITH_YWGC_DIR . 'lib/class.ywgc-plugin-fw-loader.php'; /** * ****************************************************** * Define functions */ if (!function_exists("yith_define")) { /** * Defined a constant if not already defined * * @param string $name The constant name * @param mixed $value The value */ function yith_define($name, $value = true) { if (!defined($name)) { define($name, $value); } } } /** * ****************************************************** * Define constant */ yith_define('YWGC_CUSTOM_POST_TYPE_NAME', 'gift_card'); yith_define('YWGC_AMOUNTS', '_gift_card_amounts'); yith_define('YWGC_META_GIFT_CARD_AMOUNT', '_gift_card_amount'); yith_define('YWGC_META_GIFT_CARD_ORDER_ID', '_gift_card_order_id'); yith_define('YWGC_META_GIFT_CARD_NUMBER', 'gift_card_number'); yith_define('YWGC_META_GIFT_CARD_POST_ID', '_ywgc_gift_card_post_id');
<?php } if (!function_exists('yith_plugin_registration_hook')) { require_once 'plugin-fw/yit-plugin-registration-hook.php'; } register_activation_hook(__FILE__, 'yith_plugin_registration_hook'); require_once plugin_dir_path(__FILE__) . 'functions.php'; yith_define('YITH_YWAR_FREE_INIT', plugin_basename(__FILE__)); yith_define('YITH_YWAR_VERSION', '1.1.9'); yith_define('YITH_YWAR_FILE', __FILE__); yith_define('YITH_YWAR_DIR', plugin_dir_path(__FILE__)); yith_define('YITH_YWAR_URL', plugins_url('/', __FILE__)); yith_define('YITH_YWAR_ASSETS_URL', YITH_YWAR_URL . 'assets'); yith_define('YITH_YWAR_TEMPLATE_PATH', YITH_YWAR_DIR . 'templates'); yith_define('YITH_YWAR_TEMPLATES_DIR', YITH_YWAR_DIR . '/templates/'); yith_define('YITH_YWAR_ASSETS_IMAGES_URL', YITH_YWAR_ASSETS_URL . '/images/'); /* Plugin Framework Version Check */ if (!function_exists('yit_maybe_plugin_fw_loader') && file_exists(YITH_YWAR_DIR . 'plugin-fw/init.php')) { require_once YITH_YWAR_DIR . 'plugin-fw/init.php'; } yit_maybe_plugin_fw_loader(YITH_YWAR_DIR); function yith_ywar_init() { /** * Load text domain and start plugin */ load_plugin_textdomain('yith-woocommerce-advanced-reviews', false, dirname(plugin_basename(__FILE__)) . '/languages/'); require_once YITH_YWAR_DIR . 'class.yith-woocommerce-advanced-reviews.php'; global $YWAR_AdvancedReview; $YWAR_AdvancedReview = YITH_WooCommerce_Advanced_Reviews::get_instance(); }