-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
41 lines (34 loc) · 1.15 KB
/
index.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
<?php
/**
* Plugin Name: WC BuyNow Button
* Plugin URI: #
* Description: WC Buy Now Button show any where
* Plugin URI:
* Version: 1.0.0
* Author URI: https://themeasia.net
* Author: Shipon
* Text Domain: wc-buynow-button
* License: GPL2+
* License URI: https://www.gnu.org/licenses/gpl-2.0.txt
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! function_exists( 'woocommerce' ) ) {
// This just echoes the chosen line, we'll position it later
function wc_buynow_btn_notice() {
echo '<div id="message" class="updated notice is-dismissible"><p>Please install/active Woocommerce Plugin.</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>';
}
add_action( 'admin_notices', 'wc_buynow_btn_notice' );
} else {
return true;
}
/* Functions */
if ( file_exists( plugin_dir_path( __FILE__ ) . '/inc/functions.php' ) ) {
include_once( plugin_dir_path( __FILE__ ) . '/inc/functions.php' );
}
/* Shortcode */
if ( file_exists( plugin_dir_path( __FILE__ ) . '/inc/shortcodes.php' ) ) {
include_once( plugin_dir_path( __FILE__ ) . '/inc/shortcodes.php' );
}