• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP Express Checkout

Express Checkout Plugin for WordPress

  • Home
  • Documentation
  • Extensions
  • Login
    • Sign In
    • Edit Profile
    • Terms & Condtions
    • My Downloads
  • Support
    • Tutorials
  • Contact
  • Show Search
Hide Search
You are here: Home / WP Express Checkout Plugin – Action Hooks Reference

WP Express Checkout Plugin – Action Hooks Reference

Below is a list of action hooks that are available in the WP Express Checkout plugin.

Table of Contents

  • Payment Processing Related
    • wpec_payment_completed
  • Thank You Page Related
    • before_wpec_thank_you_page_shortcode_execution

Payment Processing Related

wpec_payment_completed

This action hook executes after a transaction is completed. This can be used to do some additional tasks after a transaction takes place.

Below is an example of how to use this hook

add_action('wpec_payment_completed', 'wpec_after_txn_callback', 10 ,3);
function wpec_after_txn_callback ($payment, $order_id, $item_id)
{
    //Do stuff
    //$payment is the payment data array.
    //print_r($payment);//Lets see what info is in this array.
}

Thank You Page Related

before_wpec_thank_you_page_shortcode_execution

This action hook is triggered before processing the shortcode for the thank you page. The example code provided below aims to redirect visitors who navigate to this page without an order ID.

add_action('before_wpec_thank_you_page_shortcode_execution', 'my_custom_ty_page_redirect');
function my_custom_ty_page_redirect() {
    if (!isset($_GET['order_id']) && !isset($_GET['_wpnonce'])) {
        //Do the redirection to your desired URL
        $redirect_url = 'https://example.com/no-direct-access';
        Utils::redirect_to_url($redirect_url);
    }
}

Primary Sidebar

Featured Addons/Extensions

Subscription Payments Addon

Custom Fields Addon

A Simple & Lightweight Plugin

Our Approach with the Plugin

Support Link

  • Contact Us

Search

Copyright © 2025 | WP Express Checkout Plugin | A member of the Tips and Tricks HQ family.