-
Notifications
You must be signed in to change notification settings - Fork 0
/
class-woo-to-printavo.php
47 lines (36 loc) · 1.25 KB
/
class-woo-to-printavo.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
<?php
/**
* Plugin Name: WooCommerce To Printavo
* Description: Custom implementation to sync WooCommerce Orders with Printavo
* Version: 0.0.1
* Author: Darwing Medina
* Author URI: https://github.com/darwing1210
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class WooToPrintavo {
public static function loader() {
require_once plugin_dir_path( __FILE__ ) . 'lib/class-woo-to-printavo-admin.php';
require_once plugin_dir_path( __FILE__ ) . 'lib/class-woo-to-printavo-hooks.php';
}
public static function init() {
self::loader();
// Plugin specific
add_filter( 'plugin_action_links_woo-to-printavo', array( __CLASS__, 'wp_add_plugin_settings_link' ) );
// Init admin options
WooToPrintavoAdmin::init();
// Init hooks
WooToPrintavoHooks::init();
}
// Add settings link on plugin page
public static function wp_add_plugin_settings_link( $links ) {
$settings_link = '<a href="/network/admin.php?page=woo_to_printavo">Settings</a>';
array_unshift( $links, $settings_link );
return $links;
}
public static function getPluginDirUrl() {
return plugin_dir_url( __FILE__ );
}
}
WooToPrintavo::init();