-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwp-stateless-woo-extra-product-options-addon.php
More file actions
34 lines (30 loc) · 1.24 KB
/
wp-stateless-woo-extra-product-options-addon.php
File metadata and controls
34 lines (30 loc) · 1.24 KB
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
<?php
/**
* Plugin Name: WP-Stateless - WooCommerce Extra Product Options Addon
* Plugin URI: https://stateless.udx.io/addons/woo-extra-product-options/
* Description: Provides compatibility between the WooCommerce Extra Product Options and the WP-Stateless plugins.
* Author: UDX
* Version: 0.0.1
* Text Domain: wp-stateless-woocommerce-extra-product-options-addon
* Requires Plugins: woocommerce
* Author URI: https://udx.io
* License: GPLv2 or later
*
* Copyright 2025 UDX (email: info@udx.io)
*/
namespace SLCA\WooExtraProductOptions;
add_action('plugins_loaded', function () {
if (class_exists('wpCloud\StatelessMedia\Compatibility')) {
require_once ( dirname( __FILE__ ) . '/vendor/autoload.php' );
// Load
return new WooExtraProductOptions();
}
add_filter('plugin_row_meta', function ($plugin_meta, $plugin_file, $_, $__) {
if ($plugin_file !== join(DIRECTORY_SEPARATOR, [basename(__DIR__), basename(__FILE__)])) return $plugin_meta;
$plugin_meta[] = sprintf(
'<span style="color:red;">%s</span>',
__('This plugin requires WP-Stateless plugin version 3.4.0 or greater to be installed and active.', 'wp-stateless-woocommerce-extra-product-options-addon'),
);
return $plugin_meta;
}, 10, 4);
});