Skip to content

Instantly share code, notes, and snippets.

View adam-sandor's full-sized avatar

Ádám Sándor adam-sandor

View GitHub Profile
@adam-sandor
adam-sandor / checkout-logging.php
Last active October 30, 2023 20:49
checkout-logging.php
<?php
$PRIORITY=-1;
/**
* Log reaching the thank-you page with the order number
*/
add_action( 'woocommerce_thankyou', function($order_id) {
printLogMessage("Thank you page reached (order_id: " . $order_id . ")");
}, $PRIORITY, 1 );