WooCommerce Order Payment Complete Hook PHP Plugin

Order payment complete hook for woocommerce / wordpress

I always use the hook woocommerce_payment_complete This will fire as the name suggests after the order has been paid.

<?php

function order_payment_complete( $order_id ){
    $order = wc_get_order( $order_id );
    /* Insert your code */
}

add_action( 'woocommerce_payment_complete', 'order_payment_complete' );

Leave a Reply

Your email address will not be published. Required fields are marked *