Customer
Saturday Drive implementation for Customer
-
Method
- update public
- @inheritDoc Method
- toArray public
- @inheritDoc
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
PaymentMethod
-
Method
- retrievePaymentMethod public
- @inheritDoc Method
- getCardBrand public
- @inheritDoc Method
- getCardLastFour public
- @inheritDoc Method
- toArray public
- @inheritDoc
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
Subscription
-
Method
- retrieve public
- @inheritDoc Method
- getDefaultPaymentMethod public
- @inheritDoc Method
- getCustomerId public
- @inheritDoc Method
- toArray public
- @inheritDoc
URL
-
Static Method
- create public
LineItem201501
-
Method
- __construct public
- Method
- set_description public
- @inheritDoc Method
- add_image public
- @inheritDoc Method
- toArray public
- @inheritDoc
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
Metadata
-
Static Method
- create public
- Method
- has_metadata public
-
Does metadata have values
Returnboolean
Method
- toArray public
-
Return metadata as associative array
Returnvoid
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
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
Shipping
-
Static Method
- create public
- Method
- has_shipping public
- Method
- toArray public
Subscription
-
Method
- __construct public
- Method
- setTrialPeriod public
- Method
- toArray public
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
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
Paramboolean $useLineItemStructure Use older 'line_item' constructReturnInterfacesPayment
Method
- makePayment201501Object public
-
Construct payment object using 'line_item' construct
ReturnInterfacesPayment
Method
- makePayment202208Object public
-
Construct payment object using 'price/product' construct
ReturnInterfacesPayment
PaymentFactory
-
Method
- toArray public
-
Get the instance as an array.
Returnarray
PaymentFactory
-
Method
- toArray public
-
Return Customer as associative array
Returnarray
Method
- update public
-
Update given customer id using metadata entity
Paramstring $stripeCustomerIdParamMetadata $metadataReturnCustomer
PaymentFactory
-
Method
- set_description public
-
Set line item description
Paramstring $descriptionReturnvoid
Method
- add_image public
-
Add line item image
Param$imageReturnvoid
Method
- toArray public
-
Return line item as array
Returnarray
PaymentFactory
-
Method
- attach_customer_email public
-
Attach customer email
Paramstring $customer_emailReturnvoid
Method
- attach_subscription public
-
Add subscription entity
ParamEntitiesSubscription $subscriptionReturnvoid
Method
- attach_line_item public
-
Add a line item entity
ParamLineItem $line_itemReturnvoid
Method
- attach_metadata public
-
Add metadata
ParamMetadata $metadataReturnvoid
Method
- attach_shipping public
-
Add shipping entity
ParamShipping $shippingReturnvoid
Method
- set_success_url public
-
Add success URL
Paramstring $success_urlReturnvoid
Method
- set_cancel_url public
-
Add cancel URL
Paramstring $cancel_urlReturnvoid
Method
- toArray public
-
Return as associative array
Returnvoid
PaymentFactory
-
Method
- update public
-
Update PaymentIntent with associative array of parameters
Paramarray $paramsReturnPaymentIntent
Method
- hasCharge public
-
Does Payment intent have charge
Returnboolean
Method
- getChargeId public
-
Return charge ID
Returnstring
Method
- getCustomerId public
-
Return customer ID
Returnstring
Method
- getCardBrand public
-
Return card brand
Returnstring
Method
- getCardLastFour public
-
Return card last four
Returnstring
Method
- toArray public
-
Return object as associative array
Returnarray
PaymentFactory
-
Method
- retrievePaymentMethod public
-
Return PaymentMethod object for given id
Paramstring $idReturnPaymentMethod
Method
- getCardBrand public
-
Return card brand
Returnstring
Method
- getCardLastFour public
-
Return card last four
Returnstring
Method
- toArray public
-
Return object as array
Returnarray
PaymentFactory
-
Method
- setApiKey public
-
Set API key for future requests
Paramstring $apiKeyReturnvoid
Method
- getPaymentIntent public
-
Get PaymentIntent object for given id
Paramarray|string $idReturnPaymentIntent
Method
- createCheckoutSession public
-
Create a Session using array of parameters
Paramarray $paramsReturnSession
Method
- getCheckoutSession public
-
Get Checkout Session object for given id
Paramarray|string $idReturnSession
Method
- getSubscription public
-
Get Subscription object for given id
Paramarray|string $idReturnSubscription
Method
- getPaymentMethod public
-
Get PaymentMethod object for given id
Paramarray|string $idReturnPaymentMethod
Method
- getCustomer public
-
Get Customer object
ReturnCustomer
PaymentFactory
-
Method
- toArray public
-
Return object as array
Returnarray
Method
- retrieveSession public
-
Return Session for given id
Paramstring $idReturnSession
Method
- getSessionId public
-
Return Session Id
Returnstring
Method
- getPaymentIntent public
-
Return PaymentIntent Id
Returnstring
Method
- getSubscriptionId public
-
Return Subscription Id
Returnvoid
Method
- getStripeSession public
-
Return Stripe Session (not adapter Session)
ReturnStripeSession
PaymentFactory
-
Method
- retrieve public
-
Retrieve Submission for given Id
Paramstring $idReturnSubscription
Method
- getDefaultPaymentMethod public
-
Get default payment method
Returnstring
Method
- getCustomerId public
-
Return customer Id
Returnstring
Method
- toArray public
-
Return object as array
Returnarray
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
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
Paramstring $nameReturnvoid
Method
- __set public
-
Magic method setter for properties
Paramstring $nameParammixed $valueReturnVoid
Method
- __toString public
- @inheritDoc Method
- getLevel public
-
Get PSR log level
Returnstring
Method
- setLevel public
-
Set PSR log level
Paramstring $level PSR log level
ReturnLogEntry
Method
- getSummary public
-
Get log summary
Returnstring
Method
- setSummary public
-
Set log summary
Paramstring $summary Log summary
ReturnLogEntry
Method
- getTimestamp public
-
Get timestamp in epoch format
Returnint
Method
- setTimestamp public
-
Set timestamp in epoch format
Paraminteger $timestamp Timestamp in epoch format
ReturnLogEntry
Method
- getLogPoint public
-
Get situation under which entry happened
Returnstring
Method
- setLogPoint public
-
Set situation under which entry happened
Paramstring $logPoint Situation under which entry happened
ReturnLogEntry
Method
- getSupportingData public
-
Get supporting data
Returnstring
Method
- setSupportingData public
-
Set supporting data
Paramstring $supportingData
ReturnLogEntry
Method
- getExpiration public
-
Get used for cleanup of records in DB
Returninteger
Method
- setExpiration public
-
Set used for cleanup of records in DB
Paraminteger $expiration Used for cleanup of records in DB
ReturnLogEntry
LogLevel
Class that extends standard log levels with custom log levels
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
ReturnNfLogger
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
DownloadDebugLog
-
Method
- __construct public
- Method
- getDebugJson public
-
Get debug log as JSON string
Returnstring
Method
- getDebugLog protected
-
Get collection of log entries for the plugin
Returnarray
Method
- constructJsonString protected
-
Construct JSON string from debug log
Returnstring
Method
- constructLineItem protected
-
Construct a stringed line item as JSON for easy reading
Unpack double encoded supportingData
ParamLogEntry $logEntryReturnstring
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
ParamNfLogHandler $handlerParamstring $logLevelReturnvoid
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
Returnarray
Method
- getLogEntriesByLevel public
-
Get log entries by log level
Paramstring $requested The requested level to fetchReturnarray
Method
- getCallerLogEntries public
-
Get log entries by caller
Paramstring $identifier The target log pointReturnarray
Method
- getLogEntriesByParam protected
-
Base method for getting log entries from the table
Paramstring $key the column to narrow our results byParammixed $value the value(s) to apply in our searchReturnarray
Method
- $logEntryArray
- Method
- deletePluginLogEntries public
- @inheritDoc Method
- buildLogEntry protected
-
Construct log entry object from log request
Param$messageParamarray $contextReturnLogEntry
Method
- maybeAddTable protected
-
Add our table if necessary
Returnvoid
Method
- tableExists protected
-
Verify our table exists
Returnboolean
Method
- storeLogEntry protected
-
Store entry in our table
ParamLogEntry $logEntryReturnvoid
Method
- setPluginPrefix public
- @inheritDoc
TableLogHandler
-
Method
- getLogger public
-
Provide a logger with desired log handlers
ReturnNfLogger
Method
- getDebugLogHandler public
-
Construct the desired log handler for debug level logs
ReturnNfLogHandler
Method
- getWarningHandler public
-
Construct the desired log handler for warning level logs
ReturnNfLogHandler
TableLogHandler
-
Method
- log public
-
Handle the log data in some fashion
Typical uses include storing data in log file or in DB
Paramstring|\Stringable $keyParamarray $contextReturnvoid
Method
- getPluginLogEntries public
-
Return indexed array of all log entries for a given plugin
Returnarray LogEntry[]
Method
- deletePluginLogEntries public
-
Delete all plugin entries for a given plugin
Returnvoid
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
Paramstring $prefixReturnvoid
TableLogHandler
-
Method
- pushLogHandler public
-
Push a log handler onto the stack of handlers
ParamLogHandler $handlerParamstring $logLevelReturnvoid
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 nonceParamWP_REST_Request $requestReturnvoid
AbstractLogger
InvalidArgumentException
LogLevel
Describes log levels.
LogLevel
-
Method
- setLogger public
-
Sets a logger instance on the object.
ParamLoggerInterface $logger
Returnvoid
LogLevel
-
Method
- setLogger public
-
Sets a logger.
ParamLoggerInterface $logger
LogLevel
-
Method
- emergency public
-
System is unusable.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
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.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
Method
- critical public
-
Critical conditions.
Example: Application component unavailable, unexpected exception.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
Method
- error public
-
Runtime errors that do not require immediate action but should typically
be logged and monitored.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
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.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
Method
- notice public
-
Normal but significant events.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
Method
- info public
-
Interesting events.
Example: User logs in, SQL logs.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
Method
- debug public
-
Detailed debug information.
Paramstring|\Stringable $messageParammixed[] $context
Returnvoid
Method
- log public
-
Logs with an arbitrary level.
Parammixed $levelParamstring|\Stringable $messageParammixed[] $context
Returnvoid
Throws\Psr\Log\InvalidArgumentException
LogLevel
-
Method
- emergency public
-
System is unusable.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
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.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
Method
- critical public
-
Critical conditions.
Example: Application component unavailable, unexpected exception.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
Method
- error public
-
Runtime errors that do not require immediate action but should typically
be logged and monitored.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
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.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
Method
- notice public
-
Normal but significant events.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
Method
- info public
-
Interesting events.
Example: User logs in, SQL logs.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
Method
- debug public
-
Detailed debug information.
Paramstring|\Stringable $messageParamarray $context
Returnvoid
Method
- log public
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.
Parammixed $levelParamstring|\Stringable $messageParamarray $context
Returnvoid
Throws\Psr\Log\InvalidArgumentException
Foo
-
Method
- __construct public
- Method
- doSomething public
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
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
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.
Since1.0.7Returnvoid
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.
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 */
NF_Stripe_Subs_Deprecated
-
Method
- nf_stripe_activation /* * Activation function * * @since 1.0 * @return void */
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 */
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
NF_Stripe_Subs_Deprecated
-
Method
- ninja_forms_stripe_charge_id_shortcode <?php
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
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
NF_Stripe_Checkout_Admin_Metaboxes_MetaboxEntityPaymentStatus
-
Method
- handle public
- Static Method
- extractResponses protected
NF_Stripe_Checkout_Admin_Metaboxes_Submission
-
Method
- __construct public
- Method
- render_metabox public
NF_Stripe_Checkout_Admin_Settings
-
Method
- __construct public
- Method
- plugin_settings public
- Method
- plugin_settings_groups public
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
NF_Stripe_Checkout_MergeTags
-
Method
- __construct public
- Method
- __call public
- Method
- set public
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.
Paramarray $action_settings Action specific settings.Paramint $form_id The ID of the submitted form.Paramarray $data Form submission data.Returnarray $data Modified submission data.
Method
- ensureAutoload protected
-
Ensure that dependency autoloader is loaded
Returnvoid
Method
- setApiKey protected
-
Set Stripe API Key
Paramarray $action_settingsReturnvoid
Method
- processSuccess protected
-
Process when return value indicates success
ParamFormData $form_dataReturnFormData
Method
- submissionHasPaymentIntent protected
-
Process when submission has payment intent
ParamFormData $form_dataParamNfSubmission $submissionReturnvoid
Method
- updateSubmissionWithSession protected
-
Add session data to submission
ParamNfSubmission $submissionParamarray $action_settingsReturnvoid
Method
- updateMergeTags protected
-
Update NF merge tags
Paramstring $stripe_customer_idParamstring $card_brandParamstring $card_last_fourReturnvoid
Method
- updateSubmissionWithPaymentDetails protected
-
Update submission with payment details
ParamNfSubmission $submissionParamstring $stripe_customer_idParamstring $card_brandParamstring $card_last_fourReturnvoid
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
ReturnNF_Stripe_Checkout_PaymentGateway
Method
- getLogger public
- Provide the logger, fallback to empty logger Method
- setSdkAdapter public
-
Set the value of sdkAdapter
ReturnNF_Stripe_Checkout_PaymentGateway
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
NF_Stripe_Checkout_Submission
-
Method
- ninja_forms_stripe_deprecated_plugin_settings
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
ParamWP_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 loggerReturnvoid
Method
- adminNotices public
-
Function to register any admin notices we need to show.
Param$notices (Array) The list of admin notices.Returnarray The updated list of admin notices.
Method
- addMetabox public
-
Add a metabox constructor to the react.js submissions page
Paramarray $metaboxHandlersReturnarray
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.
Paramarray $fields The fields on this form.Returnarray 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.
Paramarray $payment_gatewaysReturnarray $payment_gateways
Method
- register_actions public
-
Register Stripe Action
Paramarray $actionsReturnarray $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.
Since3.0Paramarray $csv_arrayParamarray $subsParamint $form_idReturnarray
Method
- register_templates public
-
Register Templates
Registers our custom form templates.
Param$templatesReturnmixed
Static Method
- form_templates public
- Method
- setup_license public
- Method
- NF_Stripe_Checkout
- Method
- NF_Stripe_Checkout_Upgrade
LineItemFactoryTest
-
Method
- testCreate public
- Method
- testCreateProductName public
- Method
- testCreateProductDescription public
- Method
- testCreateProductImages public
LineItemTest
-
Method
- testToArray public
- Method
- testToArrayWithQuantity public
- Method
- testToArrayWithImages public
- Method
- testToArrayWithMultipleImages public
- Method
- testToArrayWithDescription public
MetaDataTest
-
Method
- testFactoryReturnType public
- Method
- testCreate public
- Method
- testCreateEmpty public
ShippingTest
-
Method
- testFactoryReturnType public
- Method
- testCreate public
- Method
- testCreateEmpty public
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
SubscriptionTest
-
Method
- testToArray public
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.
Returnvoid
Method
- defineAbspath protected
-
Set ABSPATH to the Wordpress directory
Returnvoid
Method
- UnitShims protected
-
Include WP shims not handled by Brain Monkey
Returnvoid
Method
- shimNinjaForms protected
-
Shim basic Ninja_Forms() functionality to enable unit testing
Returnvoid
Method
- configureGetOption public
-
Mock get_option and update_option with global array variable
Paramarray $incomingOptionsReturnvoid
Method
- configure public
-
Return a configuration array
Paramstring $configurationNameParamstring $extensionReturnarray
PluginTestCase
-
Method
- add_shortcode <?php
PluginTestCase
-
Method
- esc_html__ <?php
PluginTestCase
-
Method
- get_option
- Method
- update_option
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$idReturnNF_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' ) );
Returnstring
Method
- dispatcher public
- Method
- eos public
- Method
- session public
- Method
- request public
- Method
- background_process public
- Method
- get_setting public
-
Get a setting
Paramstring $keyParambool|false $defaultReturnbool
Method
- get_settings public
-
Get all the settings
Returnarray
Method
- update_setting public
-
Update a setting
Paramstring $keyParammixed $valueParambool|false $defer_update Defer the database update of all settings
Method
- update_settings public
-
Save settings to database
Paramarray $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 */
Ninja_Forms
-
Method
- plugins_url <?php
- Method
- is_ssl
Ninja_Forms
-
Method
- __
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 {Linkhttps://www.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'} type are valid.
Also see the {Linkhttps://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.
PackageWordPressSubpackagePluginSince1.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. */
VerifyTestStructureTest
-
Method
- ensureTestSuiteRuns public
- @test