<?php
/*
 * Plugin Name: WPCargo Shipment Rate
 * Plugin URI: http://wptaskforce.com/
 * Description: WPCargo Shipping Rate allows you to define rates based on the origin and destination entered in Search Rates form. The system allows you to define your locations, zones and shipping rates and let clients enter shipment weight and dimensions to get rate results. This plugin requires Woocommerce for integration which allows clients to proceed to checkout after filling in the shipment information.
 * Author: <a href="http://www.wptaskforce.com/">WPTaskForce</a>
 * Text Domain: wpcargo-shipment-rate
 * Domain Path: /languages
 * Version: 7.1.1
 */
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}
//* Defined constant
define( 'WPCSR_URL', plugin_dir_url( __FILE__ ) );
define( 'WPCSR_PATH', plugin_dir_path( __FILE__ ) );
define( 'WPCSR_TEXTDOMAIN', 'wpcargo-shipment-rate' );
define( 'WPCSR_VERSION', '7.1.1' );
define( 'WPCSR_DB_VERSION', '5.3.5' );
define( 'WPCSR_HOME_URL', home_url() );
define( 'WPCSR_BASENAME', plugin_basename( __FILE__ ) );
define( 'WPCSR_UPDATE_REMOTE', 'updates-php7.2'  );
// PLugin tables defined variables
define( 'WPCSR_PER_PAGE', 24 );
define( 'WPCSR_DB_RATE', 'wpcsr_rate' );
define( 'WPCSR_DB_PICKUP', 'wpcsr_pickup_rates' );
define( 'WPCSR_DB_ZONE', 'wpcsr_zone' );
define( 'WPCSR_DB_LOCATION', 'wpcsr_location' );
define( 'WPCSR_DB_DELIVERY', 'wpcsr_delivery' );
define( 'WPCSR_DB_USER_GROUP', 'wpcsr_user_group' );
add_action( 'plugins_loaded', 'wpc_shipping_rate_load_textdomain' );
function wpc_shipping_rate_load_textdomain() {
	load_plugin_textdomain( 'wpcargo-shipment-rate', false, '/wpcargo-shipment-rate/languages' );
}
require_once( WPCSR_PATH.'admin/includes/helpers-lang.php');
require_once( WPCSR_PATH.'admin/includes/helpers-calc.php');
require_once( WPCSR_PATH.'admin/includes/functions.php');
require_once( WPCSR_PATH.'admin/includes/countries.php');
require_once( WPCSR_PATH.'admin/includes/filters.php');
require_once( WPCSR_PATH.'admin/includes/woo-hooks.php');
require_once( WPCSR_PATH.'admin/includes/rate-qty.php');
require_once( WPCSR_PATH.'admin/classes/class-scripts.php');
require_once( WPCSR_PATH.'admin/classes/class-core.php');
require_once( WPCSR_PATH.'admin/classes/api.php');
require_once( WPCSR_PATH.'admin/classes/class-metabox.php');
require_once( WPCSR_PATH.'admin/classes/class-pickup.php');
require_once( WPCSR_PATH.'admin/includes/wpcsr-ajax.php');
require_once( WPCSR_PATH.'admin/includes/wpcsr-install-db.php');
register_activation_hook(__FILE__, array( 'WPCSR_Install_DB', 'wpcsr_plugin_activated' ) );
register_activation_hook(__FILE__, array( 'WPCSR_Install_DB', 'update_table' ) );
register_activation_hook(__FILE__, array( 'WPCSR_Install_DB', 'create_rate' ) );
register_activation_hook( __FILE__, 'wpcsr_rate_result_page' );
add_action( 'plugins_loaded', array( 'WPCSR_Install_DB', 'update_table' ) );