Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created July 18, 2025 15:20
Show Gist options
  • Save xlplugins/4b7171440f446e404a9d0847e8382e05 to your computer and use it in GitHub Desktop.
Save xlplugins/4b7171440f446e404a9d0847e8382e05 to your computer and use it in GitHub Desktop.
upsell_product_setup_hook.php
/**
* Hook: wfocu_offer_setup_completed
*
* Fires after the offer setup process is completed in FunnelKit One Click Upsells.
*
* This hook allows you to access and manipulate offer data, such as products, after the offer has been fully set up.
* You can use this hook to retrieve the product data for the current offer as shown below:
*
* Example:
* add_action( 'wfocu_offer_setup_completed', function() {
* // Access the product data for the current offer
* $products = WFOCU_Core()->template_loader->product_data->products;
* // Do something with $products
* } );
*
* @since 2.0.0
*/
add_action( 'wfocu_offer_setup_completed', function() {
$products = WFOCU_Core()->template_loader->product_data->products;
// You can now use $products as needed.
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment