This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpricefiles.php
executable file
·55 lines (46 loc) · 1.58 KB
/
pricefiles.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* @package woocommerce-pricefiles
* @author Peter Elmered <[email protected]>
* @license GPL-2.0+
* @link http://elmered.com
* @copyright 2014 Peter Elmered
*
* @wordpress-plugin
* Plugin Name: WooCommerce Pricefiles
* Plugin URI: http://wordpress.org/plugins/woocommerce-pricefiles/
* Description: Connect your WooCommerce shop to Price comparison sites with Pricefiles. Supports: Prisjakt / PriceSpy and Pricerunner
* Version: 1.0.0-beta
* Author: Peter Elmered
* Author URI: http://elmered.com
* Text Domain: woocommerce-pricefiles
* Domain Path: /languages
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
/*
//For debuging
error_reporting(E_ALL);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
require('define.php');
define('WP_PRICEFILES_PLUGIN_NAME', untrailingslashit(plugin_basename(__FILE__)));
if ( ! class_exists( 'WC_Pricefiles' ) )
{
require_once( WP_PRICEFILES_PLUGIN_PATH .'includes/pricefiles.php' );
}
add_action( 'plugins_loaded', 'WC_Pricefiles' );
// Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
register_activation_hook(__FILE__, array(WC_Pricefiles(), 'activate'));
//Deletes all data if plugin deactivated
register_deactivation_hook(__FILE__, array(WC_Pricefiles(), 'deactivate'));
function WC_Pricefiles()
{
require_once( WP_PRICEFILES_PLUGIN_PATH .'includes/pricefiles.php' );
return WC_Pricefiles::get_instance();
}