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-02-28 09:02:27 +00:00
|
|
|
|
2021-03-01 03:57:53 +00:00
|
|
|
add_action( 'wp_loaded', function() {
|
2024-02-28 23:47:15 +00:00
|
|
|
require_once __DIR__ . '/vendor/autoload.php';
|
2021-03-01 03:57:53 +00:00
|
|
|
require( 'api/api.php' );
|
|
|
|
} );
|
2022-03-15 14:09:40 +00:00
|
|
|
|
|
|
|
add_filter( 'woocommerce_admin_get_feature_config', function( $feature_config ) {
|
2023-05-05 08:10:26 +00:00
|
|
|
$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;
|
2024-02-28 23:47:15 +00:00
|
|
|
} );
|
2024-07-16 11:55:38 +00:00
|
|
|
|