diff --git a/includes/class-wc-gateway-payfast.php b/includes/class-wc-gateway-payfast.php index a3bce9f..e3ca0e4 100644 --- a/includes/class-wc-gateway-payfast.php +++ b/includes/class-wc-gateway-payfast.php @@ -1358,6 +1358,14 @@ public function cancel_subscription_listener( $subscription ) { if ( empty( $token ) ) { return; } + $subscription_id = $subscription->get_id(); + $this->log( + sprintf( + 'Cancellation request for token %s for subscription %d sent to Payfast', + sanitize_key( $token ), // Should be a hyphen separated alphanumeric string. + $subscription_id + ) + ); $this->api_request( 'cancel', $token, array(), 'PUT' ); }