Last Updated: Sep. 02, 2022 at 03:05am UTC
Class

Customer

Saturday Drive implementation for Customer

Method
update public
@inheritDoc
Method
toArray public
@inheritDoc
Class

PaymentIntent

Method
__construct public
Method
hasCharge public
@inheritDoc
Method
update public
@inheritDoc
Method
getChargeId public
@inheritDoc
Method
getCustomerId public
@inheritDoc
Method
getCardBrand public
@inheritDoc
Method
getCardLastFour public
@inheritDoc
Method
toArray public
@inheritDoc
Class

PaymentMethod

Method
retrievePaymentMethod public
@inheritDoc
Method
getCardBrand public
@inheritDoc
Method
getCardLastFour public
@inheritDoc
Method
toArray public
@inheritDoc
Class

Session

Method
create public
@inheritDoc
Method
retrieveSession public
@inheritDoc
Method
toArray public
@inheritDoc
Method
getSubscriptionId public
@inheritDoc
Method
getStripeSession public
@inheritDoc
Method
getSessionId public
@inheritDoc
Method
getPaymentIntent public
@inheritDoc
Class

Subscription

Method
retrieve public
@inheritDoc
Method
getDefaultPaymentMethod public
@inheritDoc
Method
getCustomerId public
@inheritDoc
Method
toArray public
@inheritDoc
Class

URL

Static Method
create public
Class

LineItem201501

Method
__construct public
Method
set_description public
@inheritDoc
Method
add_image public
@inheritDoc
Method
toArray public
@inheritDoc
Class

LineItem202208

Line Item migration to Stripe version 2022-08-01

Method
__construct public
Method
set_description public
@inheritDoc
Method
add_image public
@inheritDoc
Method
toArray public
@inheritDoc
Class

Metadata

Static Method
create public
Method
has_metadata public
Does metadata have values
Return
boolean
Method
toArray public
Return metadata as associative array
Return
void
Class

Payment201501

Method
attach_customer_email public
@inheritDoc
Method
attach_subscription public
@inheritDoc
Method
attach_line_item public
@inheritDoc
Method
attach_metadata public
@inheritDoc
Method
attach_shipping public
@inheritDoc
Method
set_success_url public
@inheritDoc
Method
set_cancel_url public
@inheritDoc
Method
toArray public
@inheritDoc
Class

Payment202208

Method
attach_customer_email public
@inheritDoc
Method
attach_subscription public
@inheritDoc
Method
attach_line_item public
@inheritDoc
Method
attach_metadata public
@inheritDoc
Method
attach_shipping public
@inheritDoc
Method
set_success_url public
@inheritDoc
Method
set_cancel_url public
@inheritDoc
Method
toArray public
@inheritDoc
Class

Shipping

Static Method
create public
Method
has_shipping public
Method
toArray public
Class

Subscription

Method
__construct public
Method
setTrialPeriod public
Method
toArray public
Class

LineItemFactory

Construct a LineItem entitie from associative array
NOTE that currently there are no line item differences between the two API versions, but both are kept for ease of future addition

Static Method
create public
Static Method
create2208 public
Class

PaymentFactory

Construct the requested PaymentObject
Stripe has two data structures - a 'line_item' structure and 'price/product' structure. The line_item structure is being deprecated so the new default is to use the price/product structure. An optional boolean enables the use of the older construct.

Method
makePaymentObject public
Return a PaymentObject
Param
boolean $useLineItemStructure Use older 'line_item' construct
Return
InterfacesPayment
Method
makePayment201501Object public
Construct payment object using 'line_item' construct
Return
InterfacesPayment
Method
makePayment202208Object public
Construct payment object using 'price/product' construct
Return
InterfacesPayment
Class

PaymentFactory

Method
toArray public
Get the instance as an array.
Return
array
Class

PaymentFactory

Method
toArray public
Return Customer as associative array
Return
array
Method
update public
Update given customer id using metadata entity
Param
string $stripeCustomerId
Param
Metadata $metadata
Return
Customer
Class

PaymentFactory

Method
set_description public
Set line item description
Param
string $description
Return
void
Method
add_image public
Add line item image
Param
$image
Return
void
Method
toArray public
Return line item as array
Return
array
Class

PaymentFactory

Method
attach_customer_email public
Attach customer email
Param
string $customer_email
Return
void
Method
attach_subscription public
Add subscription entity
Param
EntitiesSubscription $subscription
Return
void
Method
attach_line_item public
Add a line item entity
Param
LineItem $line_item
Return
void
Method
attach_metadata public
Add metadata
Param
Metadata $metadata
Return
void
Method
attach_shipping public
Add shipping entity
Param
Shipping $shipping
Return
void
Method
set_success_url public
Add success URL
Param
string $success_url
Return
void
Method
set_cancel_url public
Add cancel URL
Param
string $cancel_url
Return
void
Method
toArray public
Return as associative array
Return
void
Class

PaymentFactory

Method
update public
Update PaymentIntent with associative array of parameters
Param
array $params
Return
PaymentIntent
Method
hasCharge public
Does Payment intent have charge
Return
boolean
Method
getChargeId public
Return charge ID
Return
string
Method
getCustomerId public
Return customer ID
Return
string
Method
getCardBrand public
Return card brand
Return
string
Method
getCardLastFour public
Return card last four
Return
string
Method
toArray public
Return object as associative array
Return
array
Class

PaymentFactory

Method
retrievePaymentMethod public
Return PaymentMethod object for given id
Param
string $id
Return
PaymentMethod
Method
getCardBrand public
Return card brand
Return
string
Method
getCardLastFour public
Return card last four
Return
string
Method
toArray public
Return object as array
Return
array
Class

PaymentFactory

Method
setApiKey public
Set API key for future requests
Param
string $apiKey
Return
void
Method
getPaymentIntent public
Get PaymentIntent object for given id
Param
array|string $id
Return
PaymentIntent
Method
createCheckoutSession public
Create a Session using array of parameters
Param
array $params
Return
Session
Method
getCheckoutSession public
Get Checkout Session object for given id
Param
array|string $id
Return
Session
Method
getSubscription public
Get Subscription object for given id
Param
array|string $id
Return
Subscription
Method
getPaymentMethod public
Get PaymentMethod object for given id
Param
array|string $id
Return
PaymentMethod
Method
getCustomer public
Get Customer object
Return
Customer
Class

PaymentFactory

Method
toArray public
Return object as array
Return
array
Method
retrieveSession public
Return Session for given id
Param
string $id
Return
Session
Method
getSessionId public
Return Session Id
Return
string
Method
getPaymentIntent public
Return PaymentIntent Id
Return
string
Method
getSubscriptionId public
Return Subscription Id
Return
void
Method
getStripeSession public
Return Stripe Session (not adapter Session)
Return
StripeSession
Class

PaymentFactory

Method
retrieve public
Retrieve Submission for given Id
Param
string $id
Return
Subscription
Method
getDefaultPaymentMethod public
Get default payment method
Return
string
Method
getCustomerId public
Return customer Id
Return
string
Method
toArray public
Return object as array
Return
array
Class

SdkAdapter

Method
setApiKey public
@inheritDoc
Method
getPaymentIntent public
@inheritDoc
Method
createCheckoutSession public
@inheritDoc
Method
getCheckoutSession public
@inheritDoc
Method
getSubscription public
@inheritDoc
Method
getPaymentMethod public
@inheritDoc
Method
getCustomer public
@inheritDoc
Class

LogEntry

Static Method
fromArray public
Static Method
fromString public
Method
toArray public
Constructs an array representation of an object
Returns all properties; if properties are not set, then values defined by setter method ensures required values are set. Undefined properties are returned as stored in object. This enables passing of undefined properties, enabling extension of object.
Method
__get public
Magic method getter for properties
Param
string $name
Return
void
Method
__set public
Magic method setter for properties

Param
string $name
Param
mixed $value
Return
Void
Method
__toString public
@inheritDoc
Method
getLevel public
Get PSR log level
Return
string
Method
setLevel public
Set PSR log level
Param
string $level PSR log level
Return
LogEntry
Method
getSummary public
Get log summary
Return
string
Method
setSummary public
Set log summary
Param
string $summary Log summary
Return
LogEntry
Method
getTimestamp public
Get timestamp in epoch format
Return
int
Method
setTimestamp public
Set timestamp in epoch format
Param
integer $timestamp Timestamp in epoch format
Return
LogEntry
Method
getLogPoint public
Get situation under which entry happened
Return
string
Method
setLogPoint public
Set situation under which entry happened
Param
string $logPoint Situation under which entry happened
Return
LogEntry
Method
getSupportingData public
Get supporting data
Return
string
Method
setSupportingData public
Set supporting data
Param
string $supportingData
Return
LogEntry
Method
getExpiration public
Get used for cleanup of records in DB
Return
integer
Method
setExpiration public
Set used for cleanup of records in DB
Param
integer $expiration Used for cleanup of records in DB
Return
LogEntry
Class

LogLevel

Class that extends standard log levels with custom log levels

Class

LoggerFactory

Method
__construct public
Method
getLogger public
@inheritDoc
Method
getDebugLogHandler public
@inheritDoc
Method
getWarningHandler public
@inheritDoc
Method
createDebugLogRoutes public
@inheritDoc
Method
constructLogger protected
Construct common logger
Return
NfLogger
Class

DateTimeConverter

Converts timestamps between formats, cognizant of WordPress settings
This class is aware of the WordPress timezone settings and can convert stringed times into integer timestamps and vice-versa, relieving all other classes of this responsibility.

Static Method
localizeDateTimeStringIntoEpoch public
Static Method
localizeEpochIntoString public
Static Method
getWpTimezoneSetting public
Class

DownloadDebugLog

Method
__construct public
Method
getDebugJson public
Get debug log as JSON string
Return
string
Method
getDebugLog protected
Get collection of log entries for the plugin
Return
array
Method
constructJsonString protected
Construct JSON string from debug log
Return
string
Method
constructLineItem protected
Construct a stringed line item as JSON for easy reading Unpack double encoded supportingData
Param
LogEntry $logEntry
Return
string
Class

Logger

Logs data

Method
log public
Record log using available handler at that level @inheritDoc
Method
pushLogHandler public
Assigns a single handler to a given log level @inheritDoc
Param
NfLogHandler $handler
Param
string $logLevel
Return
void
Class

TableLogHandler

Stores record as a DB entry Some of these may be expected to expire

Method
log public
@inheritDoc
Method
getPluginLogEntries public
@inheritDoc
Method
getAllLogEntries public
Get every log entry in the table
Return
array
Method
getLogEntriesByLevel public
Get log entries by log level
Param
string $requested The requested level to fetch
Return
array
Method
getCallerLogEntries public
Get log entries by caller
Param
string $identifier The target log point
Return
array
Method
getLogEntriesByParam protected
Base method for getting log entries from the table
Param
string $key the column to narrow our results by
Param
mixed $value the value(s) to apply in our search
Return
array
Method
$logEntryArray
Method
deletePluginLogEntries public
@inheritDoc
Method
buildLogEntry protected
Construct log entry object from log request
Param
$message
Param
array $context
Return
LogEntry
Method
maybeAddTable protected
Add our table if necessary
Return
void
Method
tableExists protected
Verify our table exists
Return
boolean
Method
storeLogEntry protected
Store entry in our table
Param
LogEntry $logEntry
Return
void
Method
setPluginPrefix public
@inheritDoc
Class

TableLogHandler

Method
getLogger public
Provide a logger with desired log handlers
Return
NfLogger
Method
getDebugLogHandler public
Construct the desired log handler for debug level logs
Return
NfLogHandler
Method
getWarningHandler public
Construct the desired log handler for warning level logs
Return
NfLogHandler
Class

TableLogHandler

Method
log public
Handle the log data in some fashion Typical uses include storing data in log file or in DB
Param
string|\Stringable $key
Param
array $context
Return
void
Method
getPluginLogEntries public
Return indexed array of all log entries for a given plugin
Return
array LogEntry[]
Method
deletePluginLogEntries public
Delete all plugin entries for a given plugin
Return
void
Method
setPluginPrefix public
Set plugin prefix
Handlers must have a method to retrieve stored entries by plugin; setting this key enables easy identification by each handler
Param
string $prefix
Return
void
Class

TableLogHandler

Method
pushLogHandler public
Push a log handler onto the stack of handlers
Param
LogHandler $handler
Param
string $logLevel
Return
void
Class

DebugLog

Method
__construct public
Method
registerRoutes /** * Register REST API routes for the debug log */
Method
getDebugLogEntries public
Method
deleteAllDiagnostics public
Method
getDebugLogEntriesPermissionCallback public
Verify user is permitted to download diagnostics
Authorization handled using WP nonce
Param
WP_REST_Request $request
Return
void
Class

AbstractLogger

Class

InvalidArgumentException

Class

LogLevel

Describes log levels.

Class

LogLevel

Method
setLogger public
Sets a logger instance on the object.
Param
LoggerInterface $logger
Return
void
Class

LogLevel

Method
setLogger public
Sets a logger.
Param
LoggerInterface $logger
Class

LogLevel

Method
emergency public
System is unusable.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
alert public
Action must be taken immediately.
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
critical public
Critical conditions.
Example: Application component unavailable, unexpected exception.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
error public
Runtime errors that do not require immediate action but should typically be logged and monitored.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
warning public
Exceptional occurrences that are not errors.
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
notice public
Normal but significant events.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
info public
Interesting events.
Example: User logs in, SQL logs.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
debug public
Detailed debug information.
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Method
log public
Logs with an arbitrary level.
Param
mixed $level
Param
string|\Stringable $message
Param
mixed[] $context
Return
void
Throws
\Psr\Log\InvalidArgumentException
Class

LogLevel

Method
emergency public
System is unusable.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
alert public
Action must be taken immediately.
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
critical public
Critical conditions.
Example: Application component unavailable, unexpected exception.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
error public
Runtime errors that do not require immediate action but should typically be logged and monitored.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
warning public
Exceptional occurrences that are not errors.
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
notice public
Normal but significant events.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
info public
Interesting events.
Example: User logs in, SQL logs.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
debug public
Detailed debug information.
Param
string|\Stringable $message
Param
array $context
Return
void
Method
log public
Class

NullLogger

This Logger can be used to avoid conditional log calls.
Logging should always be optional, and if no logger is provided to your library creating a NullLogger instance to have something to throw logs at is a good way to avoid littering your code with `if ($this->logger) { }` blocks.

Method
log public
Logs with an arbitrary level.
Param
mixed $level
Param
string|\Stringable $message
Param
array $context
Return
void
Throws
\Psr\Log\InvalidArgumentException
Class

Foo

Method
__construct public
Method
doSomething public
Class

NF_Stripe_Processing

Method
__construct public
Method
process_token public
Method
add_charge_id public
Method
get_description private
Method
get_purchase_total public
Method
nf_stripe_processing // End Class
Class

NF_Stripe_Settings

Method
__construct public
Initialize the plugin
Method
load_stripe_settings public
Method
save_stripe_settings public
Method
load_stripe_form_settings public
Method
load_stripe_field_settings public
Method
ninja_forms_stripe_initiate // Class
Class

NF_Stripe_Subs

Method
__construct public
Method
filter_sub_table_columns /* * * Filter our submissions table columns * * @since 1.0.7 * @return void */
Method
stripe_columns /* * * Output our Stripe column data * * @since 1.0.7 * @return void */
Method
filter_csv_labels /* * * Modifies the header-row of the exported CSV file by adding 'Stripe Charge ID'. * * @since 1.0 * @return $label_array array */
Method
add_stripe_info public
Register a metabox to the side of the submissions page for displaying Stripe status.
Since
1.0.7
Return
void
Method
stripe_info_metabox /* * * Outupt stripe charge ID. * * @since 1.0.7 * @return void */
Method
ninja_forms_stripe_modify_sub // Initiate our sub settings class if we are on the admin.
Class

NF_Stripe_Subs_Deprecated

Method
__construct public
Method
modify_header /* * * Function that modifies our view subs table header if the form has Stripe enabled. * * @since 1.0 * @return void */
Method
modify_tr /* * * Function that modifies our view subs table row with Stripe information. * * @since 1.0 * @return void */
Method
filter_csv_labels /* * * Function that modifies the header-row of the exported CSV file by adding 'Charge ID'. * * @since 1.0 * @return $label_array array */
Method
filter_csv_values /* * * Function that modifies each row of our CSV by adding Charge ID if the form is set to use Stripe. * * @since 1.0 * @return $values_array array */
Class

NF_Stripe_Subs_Deprecated

Method
nf_stripe_activation /* * Activation function * * @since 1.0 * @return void */
Class

NF_Stripe_Subs_Deprecated

Method
nf_stripe_get_currencies /* * Get a an array of currencies. * * @since 1.0 * @return array $currencies */
Method
nf_stripe_get_currency /* * Get the current currency * * @since 1.0 * @return string $currency */
Method
nf_stripe_get_total /* * Get the current total. Checks for a default total if there isn't a total field in the form * * @since 1.0 * @return array $total */
Class

NF_Stripe_Subs_Deprecated

Method
nf_stripe_display_scripts /* * Add our javascript files if this form is set to use stripe. * * @since 1.0 * @return void */
Method
nf_stripe_form_js_settings
Class

NF_Stripe_Subs_Deprecated

Method
ninja_forms_stripe_charge_id_shortcode <?php
Class

NF_Stripe_Subs_Deprecated

Method
nf_stripe_setup_license <?php
Method
nf_stripe_enable_cc // Enable our credit card field
Method
ninja_forms_stripe_load_translations /** * Load translations for add-on. * First, look in WP_LANG_DIR subfolder, then fallback to add-on plugin folder. */
Method
nf_st_pre_27
Class

NF_Stripe_Checkout_ActionSettings

A decorator/wrapper of the Ninja Forms action settings array. Adds method access for known array keys without needing `isset` checks.

Method
__construct public
Method
has_plan public
Method
get_plan public
Method
has_total public
Method
get_total_in_cents public
Method
get_total public
Method
has_email public
Method
get_email public
Method
hasTrial public
Method
getTrialPeriod public
Class

NF_Stripe_Checkout_Admin_Metaboxes_MetaboxEntityPaymentStatus

Method
handle public
Static Method
extractResponses protected
Class

NF_Stripe_Checkout_Admin_Metaboxes_Submission

Method
__construct public
Method
render_metabox public
Class

NF_Stripe_Checkout_Admin_Settings

Method
__construct public
Method
plugin_settings public
Method
plugin_settings_groups public
Class

NF_Stripe_Checkout_FormData

A decorator/wrapper of the Ninja Forms form data array. Adds method access for the nested array structure.

Method
__construct public
Method
add_form_error public
Method
is_success public
Method
isCancelled public
Method
get_currency public
Method
attach_session public
Method
has_submission_id public
Method
get_submission_id public
Method
halt public
Method
toArray public
Class

NF_Stripe_Checkout_MergeTags

Method
__construct public
Method
__call public
Method
set public
Class

NF_Stripe_Checkout_PaymentGateway

The Stripe payment gateway for the Collect Payment action.

Method
__construct public
Method
nf_stripe_load_templates public
Function to output display templates.
Method
process public
Process
The main function for processing submission data.
Param
array $action_settings Action specific settings.
Param
int $form_id The ID of the submitted form.
Param
array $data Form submission data.
Return
array $data Modified submission data.
Method
ensureAutoload protected
Ensure that dependency autoloader is loaded
Return
void
Method
setApiKey protected
Set Stripe API Key
Param
array $action_settings
Return
void
Method
processSuccess protected
Process when return value indicates success
Param
FormData $form_data
Return
FormData
Method
submissionHasPaymentIntent protected
Process when submission has payment intent
Param
FormData $form_data
Param
NfSubmission $submission
Return
void
Method
updateSubmissionWithSession protected
Add session data to submission
Param
NfSubmission $submission
Param
array $action_settings
Return
void
Method
updateMergeTags protected
Update NF merge tags
Param
string $stripe_customer_id
Param
string $card_brand
Param
string $card_last_four
Return
void
Method
updateSubmissionWithPaymentDetails protected
Update submission with payment details
Param
NfSubmission $submission
Param
string $stripe_customer_id
Param
string $card_brand
Param
string $card_last_four
Return
void
Method
createPayment protected
Method
init public
Method
enqueue_scripts public
Method
enqueue_admin_scripts public
Method
has_api_keys public
Method
has_active_stripe_action private
Method
get_active_stripe_actions private
Method
get_secret_key private
Method
get_publishable_key private
Method
get_form_field_by_type private
Method
update_sub_customer_data private
This will be called on error when creating customer to update the submission data to add the error to the customer id
/
Method
update_sub_charge_data private
This will be called on error when creating charge to update the submission data to add the error to the charge id
/
Method
update_submission private
Method
get_sub_id private
Method
setLogger public
Set the logger
Return
NF_Stripe_Checkout_PaymentGateway
Method
getLogger public
Provide the logger, fallback to empty logger
Method
setSdkAdapter public
Set the value of sdkAdapter
Return
NF_Stripe_Checkout_PaymentGateway
Class

NF_Stripe_Checkout_Submission

A decorator/wrapper of the Ninja Forms Submission object. Adds method access to get/set Stripe specific extra data.

Static Method
create public
Method
__construct public
Method
__call public
Forward undeclared methods calls to the decorated/wrapped submission object.
Method
get_stripe_session_id public
Method
set_stripe_session_id public
Method
get_payment_intent_id public
Method
set_payment_intent_id public
Method
set_stripe_subscription_id public
Method
set_payment_status public
Method
set_payment_error public
Method
set_customer_id public
Method
set_charge_id public
Method
set_card_brand public
Method
set_card_last_four public
Method
set_stripe_error public
Method
set_stripe_live public
Class

NF_Stripe_Checkout_Submission

Method
ninja_forms_stripe_deprecated_plugin_settings
Class

NF_Stripe_Checkout

Static Method
instance public
Method
__construct public
Method
registerEndpoint public
Register endpoints for triggering stripe UI on NF Settings page
Method
stripePluginSettingsUi public
Callback method for Stripe endpoints
Param
WP_REST_Request $request
Method
initializeLogger public
Initializes debug logger for injection
Method
injectLogger protected
Inject logger into previously instantiated objects
The logger waits until plugins_loaded to check for NF core loading. Some objects may have been instantiated before this action has fired and cannot be constructed with the logger. These classes have the logger injected immediately after the logger has been constructed.
Method
registerSettingsScript public
Register settings script for settings page
Contains script for calling REST routes of debug logger
Return
void
Method
adminNotices public
Function to register any admin notices we need to show.
Param
$notices (Array) The list of admin notices.
Return
array The updated list of admin notices.
Method
addMetabox public
Add a metabox constructor to the react.js submissions page
Param
array $metaboxHandlers
Return
array
Method
confirm_stripe public
Function to confirm that we have active Stripe action(s) on this form. This function doesn't actually change anything. It just registers an additional filter if there are Stripe actions.
Method
remove_cc_fields public
Function to remove Credit Card fields from the Render method.
Param
array $fields The fields on this form.
Return
array The modified list of fields.
Method
update_keys public
Update the keys from the modal in the payment collection action
Method
setup_admin public
Setup Admin
Setup admin classes for Ninja Forms and WordPress.
Method
register_payment_gateways public
Register Payment Gateways
Register payment gateways with the Collect Payment action.
Param
array $payment_gateways
Return
array $payment_gateways
Method
register_actions public
Register Stripe Action
Param
array $actions
Return
array $actions
Static Method
template public
Static Method
config public
Method
autoloader public
Autoloader
Loads files using the class name to mimic the folder structure.
Param
$class_name
Method
export_transaction_data public
Hook Into Submission Exports.
Since
3.0
Param
array $csv_array
Param
array $subs
Param
int $form_id
Return
array
Method
register_templates public
Register Templates
Registers our custom form templates.
Param
$templates
Return
mixed
Static Method
form_templates public
Method
setup_license public
Method
NF_Stripe_Checkout
Method
NF_Stripe_Checkout_Upgrade
Class

LineItemFactoryTest

Method
testCreate public
Method
testCreateProductName public
Method
testCreateProductDescription public
Method
testCreateProductImages public
Class

LineItemTest

Method
testToArray public
Method
testToArrayWithQuantity public
Method
testToArrayWithImages public
Method
testToArrayWithMultipleImages public
Method
testToArrayWithDescription public
Class

MetaDataTest

Method
testFactoryReturnType public
Method
testCreate public
Method
testCreateEmpty public
Class

ShippingTest

Method
testFactoryReturnType public
Method
testCreate public
Method
testCreateEmpty public
Class

PaymentTest

Method
testToArrayEmpty public
Method
testToArrayWithCustomerEmail public
Method
testToArrayWithSubscription public
Method
testToArrayWithLineItem public
Method
testToArrayWithLineItems public
Method
testToArrayWithMetaDataForSubscription public
Method
testToArrayWithMetaDataForPayment public
Method
testToArrayWithShipping public
Method
testToArrayWithShippingAndSubscription public
Method
testToArrayWithSuccessUrl public
Method
testToArrayWithCancelUrl public
Class

SubscriptionTest

Method
testToArray public
Class

PluginTestCase

Method
setUpUnitTestMockEnvironment public
Sets up a mock environment for unit tests Adds just enough function shims to do unit testing in specific areas. Unit tests must not rely upon any of the shimmed functions, which are present only to prevent construction errors from missing function dependencies.
Return
void
Method
defineAbspath protected
Set ABSPATH to the Wordpress directory
Return
void
Method
UnitShims protected
Include WP shims not handled by Brain Monkey
Return
void
Method
shimNinjaForms protected
Shim basic Ninja_Forms() functionality to enable unit testing
Return
void
Method
configureGetOption public
Mock get_option and update_option with global array variable
Param
array $incomingOptions
Return
void
Method
configure public
Return a configuration array
Param
string $configurationName
Param
string $extension
Return
array
Class

PluginTestCase

Method
add_shortcode <?php
Class

PluginTestCase

Method
esc_html__ <?php
Class

PluginTestCase

Method
get_option
Method
update_option
Class

Ninja_Forms

This is a shim for Ninja Forms; it does not function, but it provides the named functionality such that unit tests for classes that call Ninja_Forms() on construct can be instantiated without errors. The unit tests calling this instance MUST NOT use any Ninja_Forms() functionality as the results cannot be trusted. Such integration tests will require an environment in which a true Ninja_Forms() class can operate.

Static Method
instance public
Method
form public
Form Model Factory Wrapper
Param
$id
Return
NF_Abstracts_ModelFactory
Method
logger public
Logger Class Wrapper
Example Use: Ninja_Forms()->logger()->log( 'debug', "Hello, {name}!", array( 'name' => 'world' ) ); Ninja_Forms()->logger()->debug( "Hello, {name}!", array( 'name' => 'world' ) );
Return
string
Method
dispatcher public
Method
eos public
Method
session public
Method
request public
Method
background_process public
Method
get_setting public
Get a setting
Param
string $key
Param
bool|false $default
Return
bool
Method
get_settings public
Get all the settings
Return
array
Method
update_setting public
Update a setting
Param
string $key
Param
mixed $value
Param
bool|false $defer_update Defer the database update of all settings
Method
update_settings public
Save settings to database
Param
array $settings
Static Method
template public
Static Method
config public
Method
Ninja_Forms /** * The main function responsible for returning The Highlander Ninja_Forms * Instance to functions everywhere. * * Use this function like you would a global variable, except without needing * to declare the global. * * Example: <?php $nf = Ninja_Forms(); ?> * * @since 2.7 * @return Ninja_Forms Highlander Instance */
Class

Ninja_Forms

Method
plugins_url <?php
Method
is_ssl
Class

Ninja_Forms

Method
__
Class

Ninja_Forms

Method
remove_all_filters /** * Remove all of the hooks from a filter. * * @since 2.7.0 * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * * @param string $tag The filter to remove hooks from. * @param int|false $priority Optional. The priority number to remove. Default false. * @return true True when finished. */
The plugin API is located in this file, which allows for creating actions and filters and hooking functions, and methods. The functions or methods will then be run when the action or filter is called.
The API callback examples reference functions, but can be methods of classes. To hook methods, you'll need to pass an array one of two ways.
Any of the syntaxes explained in the PHP documentation for the {
Link
https://www.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'} type are valid.
Also see the {
Link
https://developer.wordpress.org/plugins/ Plugin API} for more information and examples on how to use a lot of these functions.
This file should have no external dependencies.
Package
WordPress
Subpackage
Plugin
Since
1.5.0
Method
current_action /** * Retrieve the name of the current action. * * @since 3.9.0 * * @return string Hook name of the current action. */
Method
remove_all_actions /** * Remove all of the hooks from an action. * * @since 2.7.0 * * @param string $tag The action to remove hooks from. * @param int|false $priority The priority number to remove them from. Default false. * @return true True when finished. */
Method
plugin_basename /** * Gets the basename of a plugin. * * This method extracts the name of a plugin from its filename. * * @since 1.5.0 * * @global array $wp_plugin_paths * * @param string $file The filename of plugin. * @return string The name of a plugin. */
Method
wp_register_plugin_realpath /** * Register a plugin's real path. * * This is used in plugin_basename() to resolve symlinked paths. * * @since 3.9.0 * * @see wp_normalize_path() * * @global array $wp_plugin_paths * * @param string $file Known path to the file. * @return bool Whether the path was able to be registered. */
Method
plugin_dir_path /** * Get the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in. * * @since 2.8.0 * * @param string $file The filename of the plugin (__FILE__). * @return string the filesystem path of the directory that contains the plugin. */
Method
plugin_dir_url /** * Get the URL directory path (with trailing slash) for the plugin __FILE__ passed in. * * @since 2.8.0 * * @param string $file The filename of the plugin (__FILE__). * @return string the URL path of the directory that contains the plugin. */
Method
register_activation_hook /** * Set the activation hook for a plugin. * * When a plugin is activated, the action 'activate_PLUGINNAME' hook is * called. In the name of this hook, PLUGINNAME is replaced with the name * of the plugin, including the optional subdirectory. For example, when the * plugin is located in wp-content/plugins/sampleplugin/sample.php, then * the name of this hook will become 'activate_sampleplugin/sample.php'. * * When the plugin consists of only one file and is (as by default) located at * wp-content/plugins/sample.php the name of this hook will be * 'activate_sample.php'. * * @since 2.0.0 * * @param string $file The filename of the plugin including the path. * @param callable $function The function hooked to the 'activate_PLUGIN' action. */
Method
register_deactivation_hook /** * Set the deactivation hook for a plugin. * * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is * called. In the name of this hook, PLUGINNAME is replaced with the name * of the plugin, including the optional subdirectory. For example, when the * plugin is located in wp-content/plugins/sampleplugin/sample.php, then * the name of this hook will become 'deactivate_sampleplugin/sample.php'. * * When the plugin consists of only one file and is (as by default) located at * wp-content/plugins/sample.php the name of this hook will be * 'deactivate_sample.php'. * * @since 2.0.0 * * @param string $file The filename of the plugin including the path. * @param callable $function The function hooked to the 'deactivate_PLUGIN' action. */
Method
register_uninstall_hook /** * Set the uninstallation hook for a plugin. * * Registers the uninstall hook that will be called when the user clicks on the * uninstall link that calls for the plugin to uninstall itself. The link won't * be active unless the plugin hooks into the action. * * The plugin should not run arbitrary code outside of functions, when * registering the uninstall hook. In order to run using the hook, the plugin * will have to be included, which means that any code laying outside of a * function will be run during the uninstallation process. The plugin should not * hinder the uninstallation process. * * If the plugin can not be written without running code within the plugin, then * the plugin should create a file named 'uninstall.php' in the base plugin * folder. This file will be called, if it exists, during the uninstallation process * bypassing the uninstall hook. The plugin, when using the 'uninstall.php' * should always check for the 'WP_UNINSTALL_PLUGIN' constant, before * executing. * * @since 2.7.0 * * @param string $file Plugin file. * @param callable $callback The callback to run when the hook is called. Must be * a static method or function. */
Method
_wp_call_all_hook /** * Call the 'all' hook, which will process the functions hooked into it. * * The 'all' hook passes all of the arguments or parameters that were used for * the hook, which this function was called for. * * This function is used internally for apply_filters(), do_action(), and * do_action_ref_array() and is not meant to be used from outside those * functions. This function does not check for the existence of the all hook, so * it will fail unless the all hook exists prior to this function call. * * @since 2.5.0 * @access private * * @global WP_Hook[] $wp_filter Stores all of the filters and actions. * * @param array $args The collected parameters from the hook that was called. */
Method
_wp_filter_build_unique_id /** * Build Unique ID for storage and retrieval. * * The old way to serialize the callback caused issues and this function is the * solution. It works by checking for objects and creating a new property in * the class to keep track of the object and new objects of the same class that * need to be added. * * It also allows for the removal of actions and filters for objects after they * change class properties. It is possible to include the property $wp_filter_id * in your class and set it to "null" or a number to bypass the workaround. * However this will prevent you from adding new classes and any new classes * will overwrite the previous hook by the same class. * * Functions and static method callbacks are just returned as strings and * shouldn't have any speed penalty. * * @link https://core.trac.wordpress.org/ticket/3875 * * @since 2.2.3 * @since 5.3.0 Removed workarounds for spl_object_hash(). * `$tag` and `$priority` are no longer used, * and the function always returns a string. * @access private * * @param string $tag Unused. The name of the filter to build ID for. * @param callable $function The function to generate ID for. * @param int $priority Unused. The order in which the functions * associated with a particular action are executed. * @return string Unique function ID for usage as array key. */
Class

VerifyTestStructureTest

Method
ensureTestSuiteRuns public
@test