forked from ATaylor66/wpseo-woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwpseo-woocommerce.php
66 lines (56 loc) · 1.67 KB
/
wpseo-woocommerce.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
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* WooCommerce Yoast SEO plugin.
*
* @package WPSEO/WooCommerce
*
* @wordpress-plugin
* Plugin Name: Yoast SEO: WooCommerce
* Version: 14.4
* Plugin URI: https://yoa.st/4fu
* Description: This extension to WooCommerce and Yoast SEO makes sure there's perfect communication between the two plugins.
* Author: Team Yoast
* Author URI: https://yoa.st/1uk
* Depends: Yoast SEO, WooCommerce
* Text Domain: yoast-woo-seo
* Domain Path: /languages/
*
* WC requires at least: 3.0
* WC tested up to: 5.8
*
* Copyright 2014-2021 Yoast BV (email: support@yoast.com)
*/
if ( ! function_exists( 'add_filter' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
define( 'WPSEO_WOO_PLUGIN_FILE', __FILE__ );
define( 'WPSEO_WOO_VERSION', '14.4' );
/**
* Initializes the plugin class, to make sure all the required functionality is loaded, do this after plugins_loaded.
*
* @since 1.0
*
* @return void
*/
function initialize_yoast_woocommerce_seo() {
load_plugin_textdomain( 'yoast-woo-seo', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
global $wp_version;
$dependency_check = new Yoast_WooCommerce_Dependencies();
if ( $dependency_check->check_dependencies( $wp_version ) ) {
global $yoast_woo_seo;
// Initializes the plugin.
$yoast_woo_seo = new Yoast_WooCommerce_SEO();
}
}
if ( ! wp_installing() ) {
add_action( 'plugins_loaded', 'initialize_yoast_woocommerce_seo', 20 );
}
// Activation hook.
if ( is_admin() ) {
register_activation_hook( __FILE__, [ 'Yoast_WooCommerce_SEO', 'install' ] );
}