Solution:
It’s not possible to see the echo
output, as the activation hook runs and refreshes the page. Two options:
- Die:
function my_plugin_install(){ $sql = "CREATE TABLE (query skipped)..."; wp_die( $sql ); }
- Log to file
function my_plugin_install(){ $sql = "CREATE TABLE (query skipped)..."; $error_dir = '/Applications/MAMP/logs/php_error.log'; error_log( $sql, 3, $error_dir ); }