-
Notifications
You must be signed in to change notification settings - Fork 0
/
arti-product-shipping-notices.php
51 lines (42 loc) · 1.85 KB
/
arti-product-shipping-notices.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
<?php
/**
* Plugin Name: Product shipping notices for WCFM
* Plugin URI: https://art-idesenvolvimento.com.br/wordpress/plugins/aviso-de-frete-para-marketplaces
* Description:
* Version: 1.1.0
* Requires at least: 5.6.1
* Tested up to: 5.8.2
* WC requires at least: 5.0.0
* WC tested up to: 8.2.0
* Requires PHP: 7.1
* Author: Luis Eduardo Casper Braschi
* Author URI: http://art-idesenvolvimento.com.br
* Text Domain: arti-psn
* Domain Path: languages/
*/
defined( 'ABSPATH' ) or die;
define( 'ARTI_PSN_FILE', __FILE__ );
define( 'ARTI_PSN_BASENAME', plugin_basename( ARTI_PSN_FILE ));
define( 'ARTI_PSN_URL', plugin_dir_url( ARTI_PSN_FILE ));
define( 'ARTI_PSN_PATH', untrailingslashit(plugin_dir_path( ARTI_PSN_FILE )));
define( 'ARTI_PSN_SLUG', 'arti-psn' ); //textdomain as well
// define( 'ARTI_PSN_FONTS', ARTI_PSN_URL . 'assets/fonts' );
// define( 'ARTI_PSN_IMG', ARTI_PSN_URL . 'assets/images' );
// define( 'ARTI_PSN_JS', ARTI_PSN_URL . 'assets/js' );
// define( 'ARTI_PSN_CSS', ARTI_PSN_URL . 'assets/css' );
define( 'ARTI_PSN_TEMPLATE', ARTI_PSN_PATH . '/templates/' );
function arti_psn_includes(){
include_once ARTI_PSN_PATH . '/includes/marketplace-functions.php';
include_once ARTI_PSN_PATH . '/includes/class-shipping-notices.php';
include_once ARTI_PSN_PATH . '/includes/class-core.php';
}
add_action( 'plugin_loaded', 'arti_psn_includes' );
function arti_psn_load_plugin_textdomain() {
load_plugin_textdomain( 'arti-psn', false, dirname( ARTI_PSN_BASENAME ) . '/languages' );
}
add_action( 'init', 'arti_psn_load_plugin_textdomain' );
add_action( 'before_woocommerce_init', function() {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
} );