-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathwoocommerce-swatches.php
53 lines (43 loc) · 1.71 KB
/
woocommerce-swatches.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
<?php
/*
* Plugin Name: WooCommerce Variation Swatches and Photos
* Plugin URI: https://woocommerce.com/products/variation-swatches-and-photos/
* Description: WooCommerce Swatches and Photos allows you to configure colors and photos for shoppers on your site to use when picking variations.
* Version: 3.1.2
* Author: Lucas Stark
* Author URI: https://www.elementstark.com/about
* Requires at least: 3.5
* Tested up to: 5.5.0
* Domain Path: /i18n/languages/
* Copyright: © 2009-2020 Lucas Stark.
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*
* WC requires at least: 3.0.0
* WC tested up to: 4.4.0
* Woo: 18697:37bea8d549df279c8278878d081b062f
*/
/**
* Required functions
*/
if ( ! function_exists( 'woothemes_queue_update' ) ) {
require_once( 'woo-includes/woo-functions.php' );
}
/**
* Plugin updates
*/
woothemes_queue_update( plugin_basename( __FILE__ ), '37bea8d549df279c8278878d081b062f', '18697' );
if ( is_woocommerce_active() ) {
require 'classes/class-wc-swatches-compatibility.php';
add_action( 'init', 'wc_swatches_and_photos_load_textdomain', 0 );
function wc_swatches_and_photos_load_textdomain() {
$locale = apply_filters( 'plugin_locale', get_locale(), 'wc_swatches_and_photos' );
load_textdomain( 'wc_swatches_and_photos', WP_LANG_DIR . '/woocommerce/wc_swatches_and_photos-' . $locale . '.mo' );
load_plugin_textdomain( 'wc_swatches_and_photos', false, plugin_basename( dirname( __FILE__ ) ) . '/i18n/languages' );
}
add_action( 'plugins_loaded', 'wc_swatches_on_plugin_loaded' );
function wc_swatches_on_plugin_loaded() {
require 'woocommerce-swatches-main.php';
$GLOBALS['woocommerce_swatches'] = new WC_SwatchesPlugin();
}
}