ExpressionEngine® 3 User Guide

Legacy Documentation

You are using the documentation for version 3.5.17. Go here for the latest version or check here for your available upgrades to the latest version.

Simple Commerce Module Extension Hooks

simple_commerce_evaluate_ipn_response

simple_commerce_evaluate_ipn_response($this, $result)

Take over processing of PayPal’s response to an IPN confirmation.

How it’s called:

$result = ee()->extensions->universal_call('simple_commerce_evaluate_ipn_response', $this, $result);
if (ee()->extensions->end_script === TRUE) return;
Parameters:
  • $this (object) – The current Simple Commerce object including all data relating to the purchase and debug state
  • $result (string) – PayPal’s response to the IPN confirmation
Returns:

Modified IPN response ($result)

Return type:

String

New in version 1.5.1.

simple_commerce_perform_actions_end

simple_commerce_perform_actions_end($this, $row)

After a purchase is recorded, do more processing.

How it’s called:

ee()->extensions->universal_call('simple_commerce_perform_actions_end', $this, $query->row());
if (ee()->extensions->end_script === TRUE) return;
Parameters:
  • $this (object) – The current Simple Commerce object including all data relating to the purchase and debug state
  • $row (array) – The database record for the store item
Return type:

Void

Useful object variables:

  • $this->post - array of information about the purchase
  • $this->debug - whether or not debug mode is enabled

New in version 1.5.1.

simple_commerce_perform_actions_start

simple_commerce_perform_actions_start($this, $row)

After a purchase is recorded, do more processing before EE’s processing.

How it’s called:

ee()->extensions->universal_call('simple_commerce_perform_actions_start', $this, $query->row());
if (ee()->extensions->end_script === TRUE) return;
Parameters:
  • $this (object) – The current Simple Commerce object including all data relating to the purchase and debug state
  • $row (array) – The database record for the store item
Return type:

Void

New in version 1.5.1.