Skip to content

Instantly share code, notes, and snippets.

@hanoii
Last active April 24, 2020 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanoii/20425cb125aab6290b10a0bf186f63b2 to your computer and use it in GitHub Desktop.
Save hanoii/20425cb125aab6290b10a0bf186f63b2 to your computer and use it in GitHub Desktop.
Logging out all wordpress actions to a temporary file
<?php
add_action('all', function ($tag) {
if (preg_match('/woocommerce_/', $tag)) {
file_put_contents ('/tmp/wordpress.txt', $_SERVER['REQUEST_URI'] . '-' . $_SERVER['REQUEST_TIME'] . ': '. $tag . "\n", FILE_APPEND);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment