woocommerce/plugins/woocommerce-beta-tester/plugin.php

27 lines
781 B
PHP
Raw Normal View History

2021-02-23 05:30:49 +00:00
<?php
add_action( 'admin_menu', function() {
add_management_page(
'WooCommerce Admin Test Helper',
'WCA Test Helper',
'install_plugins',
'woocommerce-admin-test-helper',
function() {
2021-02-23 06:28:11 +00:00
?><div id="woocommerce-admin-test-helper-app-root"></div><?php
2021-02-23 05:30:49 +00:00
}
);
} );
2021-03-01 03:57:53 +00:00
add_action( 'wp_loaded', function() {
require( 'api/api.php' );
} );
2022-03-15 14:09:40 +00:00
add_filter( 'woocommerce_admin_get_feature_config', function( $feature_config ) {
$feature_config['beta-tester-slotfill-examples'] = false;
2022-03-15 14:09:40 +00:00
$custom_feature_values = get_option( 'wc_admin_helper_feature_values', array() );
foreach ( $custom_feature_values as $feature => $value ) {
if ( isset( $feature_config[$feature] ) ) {
$feature_config[$feature] = $value;
}
}
return $feature_config;
} );