RestroPress

⌘K
  1. Home
  2. Docs
  3. RestroPress
  4. Developer Docs
  5. Actions
  6. rpress_complete_purchase

rpress_complete_purchase

This action runs when a payment is marked as complete.

do_action( 'rpress_complete_purchase', $payment_id ); 

Simple example

function pw_rpress_on_complete_purchase( $payment_id ) {

	// Basic payment meta
	$payment_meta = rpress_get_payment_meta( $payment_id );

	// Cart details
	$cart_items = rpress_get_payment_meta_cart_details( $payment_id );

	// do something with payment data here
}
add_action( 'rpress_complete_purchase', 'pw_rpress_on_complete_purchase' );

How can we help?