Crash after apply_filter()
Question
my website crashes when I upload my own created plugin.
The code looks like this:
Plugin.php
/**
* Plugin Name: Plugin Test
* Description: Test
* Version: 1.1
*/
function price_plugin_menu(){
add_menu_page('Test Plugin', 'Test Plugin Menü', 'manage_options', 'test plugin', 'page_content', 'dashicons-games', '1');
}
add_action('admin_menu', 'test_plugin_menu');
function page_content(){
echo '<div class="wrap"><h2>Test PLugin</h2></div>';
}
add_filter('wc_ff_vaibale_output','my_wc_ff_vaibale_output', 10, 3);
function my_wc_ff_vaibale_output($variable, $element, $element_uniqueid){
if ( $element_uniqueid === '62488f701db0a7.13260453'){
$variable = array();
$variable[0] = "111";
}
return $variable;
}
When I run the code under functions.php, it works. The function wc_ff_vaibale_output in the filter is from another plugin.
What am I doing wrong?
0
10 months
2022-04-05T06:31:00-05:00
2022-04-05T06:31:00-05:00 0 Answers
0 views
0
Leave an answer