Last active
September 30, 2022 16:38
-
-
Save jrick1229/9da77fcbaa677293a3e4ebd4299f89b9 to your computer and use it in GitHub Desktop.
WC Subscriptions – Create a log in WC > Status > Logs to log when a subscription has been updated.
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( 'wcs_webhook_subscription_updated', 'wcs_updated_log', 999, 1 ); | |
function wcs_updated_log ( $subscription ){ | |
$logger = wc_get_logger(); | |
$logger->info( 'Subscription ID: ' . $subscription . ' was updated! -- ', array( 'source' => 'subscription-updates-2' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment