<?php

/**
 * The plugin bootstrap file
 *
 * This file is read by WordPress to generate the plugin information in the plugin
 * admin area. This file also includes all of the dependencies used by the plugin,
 * registers the activation and deactivation functions, and defines a function
 * that starts the plugin.
 *
 * @link              www.redefiningtheweb.com
 * @since             1.0.0
 * @package           Rtwwpcp_Woocommerce_Pdf_Catalog_Pro
 *
 * @wordpress-plugin
 * Plugin Name:       WooCommerce PDF Catalog
 * Plugin URI:        https://redefiningtheweb.com/plugins/
 * Description:       This plugin allows the user to create printable PDF catalogs of all products along with the respective description on their WooCommerce store.
 * Version:           2.2.2
 * Author:            RedefiningTheWeb
 * Author URI:        www.redefiningtheweb.com
 * License:           GPL-2.0+
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       rtwwpcp-woocommerce-pdf-catalog-pro
 * Domain Path:       /languages
 */

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

/**
 * Currently plugin version.
 * Start at version 1.0.0 and use SemVer - https://semver.org
 * Rename this for your plugin and update it as you release new versions.
 */
define( 'RTWWPCP_WOOCOMMERCE_PDF_CATALOG_PRO_VERSION', '2.2.2' );

/**
 * The code that runs during plugin activation.
 * This action is documented in includes/rtwwpcp-class-woocommerce-pdf-catalog-pro-activator.php
 */
function rtwwpcp_activate_woocommerce_pdf_catalog_pro() {
	require_once plugin_dir_path( __FILE__ ) . 'includes/rtwwpcp-class-woocommerce-pdf-catalog-pro-activator.php';
	Rtwwpcp_Woocommerce_Pdf_Catalog_Pro_Activator::rtwwpcp_activate();
}


register_activation_hook( __FILE__, 'rtwwpcp_activate_woocommerce_pdf_catalog_pro' );


/**
 * The core plugin class that is used to define internationalization,
 * admin-specific hooks, and public-facing site hooks.
 */
require plugin_dir_path( __FILE__ ) . 'includes/rtwwpcp-class-woocommerce-pdf-catalog-pro.php';

//Plugin Constant
if ( !defined( 'RTWWPCP_DIR' ) ) {
	define('RTWWPCP_DIR', plugin_dir_path( __FILE__ ) );
}
if ( !defined( 'RTWWPCP_URL' ) ) {
	define('RTWWPCP_URL', plugin_dir_url( __FILE__ ) );
}
if ( !defined( 'RTWWPCP_HOME' ) ) {
	define('RTWWPCP_HOME', home_url() );
}
if( !defined('RTWWPCP_PDF_DIR') ){
	define ('RTWWPCP_PDF_DIR', WP_CONTENT_DIR .'/uploads/rtwwpcp_pdf/');
}
if( !defined('RTWWPCP_PDF_URL') ){
	define('RTWWPCP_PDF_URL', WP_CONTENT_URL .'/uploads/rtwwpcp_pdf/');	
}

/**
 * Begins execution of the plugin.
 *
 * Since everything within the plugin is registered via hooks,
 * then kicking off the plugin from this point in the file does
 * not affect the page life cycle.
 *
 * @since    1.0.0
 */
function rtwwpcp_run_woocommerce_pdf_catalog_pro() {

	$plugin = new Rtwwpcp_Woocommerce_Pdf_Catalog_Pro();
	$plugin->rtwwpcp_run();

}
rtwwpcp_run_woocommerce_pdf_catalog_pro();
