Developer Tips for SPC



Action called by invoice saving after payment process in loop through billing information. Takes one argument as Array:

  • field - billing item key.
  • data - billing item data.
  • invoice_id - ID of invoice generated during payment process.
  • user_data - array of recipient information.



Filters Single Page Checkout forms’ class attribute. Allows to add custom class values to forms. Takes one String argument with current classes.


Allows to add custom tag attributes for every single form input container with default class ‘control-group’. Takes 3 arguments

  • attributes - array of default attributes.
  • slug - field slug.
  • data - array of field data.


Filters form input class attribute. Allows developers to add own custom classes. Takes 4 arguments:

  • classes - array of default classes.
  • slug - input slug.
  • data - array of input data.
  • gateway - slug of gateway.


Filters class attribute of form action sections. Allows to add custom classes for them. Takes 2 arguments:

  • class - default class value.
  • gateway - current gateway slug.


Allows to change default label for PayPal Custom Amount field. Takes one argument with default label.


Filters Total value before Single Page Checkout form rendering. Takes 2 arguments:

  • total - current total value.
  • settings - Single Page Checkout settings array.


Filters success payment message text. Takes 3 arguments:

  • message_text - current message text.
  • items - array of items which were purchased.
  • result - array of data of transaction response.


Filters Billing Information. Can be used to add new fields to Billing Information section. Takes one argument of current fields array.


Allows you to add custom classes for form input containers with default class ‘control-group’. Takes one String argument with current class.


Multiple filter that filters input HTML before rendering according to input slug. Takes 3 arguments:

  • input - input HTML.
  • slug - input slug.
  • data - array of input data.


Allows developers to change word ‘Agreement’ which is label for ‘agree terms’ checkbox to something else. Takes one String argument with current value.


Filter allows developers to customize payment button classes. Takes one Array argument with default class values.


Allows developers to customize classes of payment response box. Takes one String argument with default classes.