Created
August 1, 2019 02:47
-
-
Save ko31/4892a0a1d75bbdfb6f77e645f542cc90 to your computer and use it in GitHub Desktop.
WooCommerce サイトで予約投稿が実行されているかログを取った時に使ったプラグイン
This file contains hidden or 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 | |
| /* | |
| Plugin Name: デバッグ用 | |
| Description: WooCommerce サイトで予約投稿が実行されているかログを取った時に使ったプラグイン | |
| Author: ko31 | |
| Author URI: https://go-sign.info | |
| */ | |
| add_action( 'publish_future_post', function( $post_id ) { | |
| if ( function_exists( 'wc_get_logger' ) ) { | |
| $logger = wc_get_logger(); | |
| $context = [ 'source' => 'my_debug' ]; | |
| $logger->info( 'publish_future_post post_id=' . $post_id, $context ); | |
| } | |
| }, 11, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment