Last active
April 24, 2020 20:11
-
-
Save hanoii/20425cb125aab6290b10a0bf186f63b2 to your computer and use it in GitHub Desktop.
Logging out all wordpress actions to a temporary file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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