order_validation
extends abstract_extension
in package
Extension: order_validation - Validate order when submited
Tags
Table of Contents
- ALIAS = 'Validation'
- IP_ACTION_ARRAY = ['auth_attempts' => 0, 'shop_visit' => 0, 'prior_orders' => 0]
- VERSION = '26.0129.1'
- __construct() : void
- constructor method
- addActionsAndFilters() : void
- Add filters and actions - called from main plugin
- admin_options_settings() : void
- register options on options_settings_page
- initialize() : void
- initialize method - called from main plugin
- payment_gateway_response() : bool
- On gateway response, reset transients
- payment_gateway_validate() : bool|string
- Validate the payment gateway request prior to authorization attempt
- save_transient() : void
- Save our transient on exit
- set_shop_visit() : void
- Set shop visit time when visiting a woocommerce page to ensure visit prior to checkout
Constants
ALIAS
public
ALIAS
ALIAS
= 'Validation'
constant ($this->Validation->...)
IP_ACTION_ARRAY
public
initial
IP_ACTION_ARRAY
= ['auth_attempts' => 0, 'shop_visit' => 0, 'prior_orders' => 0]
array
VERSION
public
string
VERSION
= '26.0129.1'
extension version
Methods
__construct()
constructor method
public
__construct(object $plugin) : void
Parameters
- $plugin : object
-
main plugin object
Return values
void —addActionsAndFilters()
Add filters and actions - called from main plugin
public
addActionsAndFilters() : void
Return values
void —admin_options_settings()
register options on options_settings_page
public
admin_options_settings() : void
Tags
Return values
void —initialize()
initialize method - called from main plugin
public
initialize() : void
Return values
void —payment_gateway_response()
On gateway response, reset transients
public
payment_gateway_response(bool $is_valid, object $response, object $order) : bool
Parameters
- $is_valid : bool
-
(true)
- $response : object
-
response array
- $order : object
-
WC Order (extended)
Return values
bool —$response
payment_gateway_validate()
Validate the payment gateway request prior to authorization attempt
public
payment_gateway_validate(bool $is_valid, array<string|int, mixed> $fields) : bool|string
Parameters
- $is_valid : bool
-
(true)
- $fields : array<string|int, mixed>
-
form fields
Return values
bool|string —- true (valid) or failed message (logged)
save_transient()
Save our transient on exit
public
save_transient() : void
Return values
void —set_shop_visit()
Set shop visit time when visiting a woocommerce page to ensure visit prior to checkout
public
set_shop_visit() : void