WC_Stripe_Controller_GooglePay extends WC_Stripe_Rest_Controller uses WC_Stripe_Controller_Cart_Trait, WC_Stripe_Controller_Frontend_Trait

Tags
author

PaymentPlugins

Table of Contents

Properties

$error  : WP_Error
$namespace  : mixed
$gateway  : WC_Payment_Gateway_Stripe_GooglePay
$reason_code  : string
$request  : WP_REST_Request
$shipping_method_id  : string

Methods

add_ready_to_calc_shipping()  : mixed
Method that hooks in to the woocommerce_cart_ready_to_calc_shipping filter.
admin_permission_check()  : mixed
get_payment_response_data()  : mixed
Return a formatted array of response data required by the Google payment sheet.
register_routes()  : mixed
Register all routes that the controller uses.
rest_uri()  : mixed
rest_url()  : mixed
update_shipping_data()  : mixed
Update the WC shipping data from the Google payment sheet.
validate_rest_nonce()  : bool|WP_Error
validate_shipping_address()  : mixed
add_validation_error()  : mixed
Allows a status code of 200 to be returned even if there is a validation error.
cart_includes()  : mixed
empty_cart()  : void
frontend_includes()  : mixed
get_add_to_cart_args()  : array<string|int, mixed>
Return an array of arguments used to add a product to the cart.
get_error_messages()  : mixed
get_messages()  : mixed
get_supported_gateways()  : mixed
register_authenticated_route()  : mixed
get_default_shipping_method()  : string
Returns a default shipping method based on the chosen shipping methods.
get_shipping_method_from_request()  : array<string|int, mixed>
get_shipping_methods()  : mixed

Properties

Methods

add_ready_to_calc_shipping()

Method that hooks in to the woocommerce_cart_ready_to_calc_shipping filter.

public add_ready_to_calc_shipping() : mixed

Purpose is to ensure true is returned so shipping packages are calculated. Some 3rd party plugins and themes return false if the current page is the cart because they don't want to display the shipping calculator.

Tags
since
3.1.0

validate_shipping_address()

public validate_shipping_address(array<string|int, mixed> $address, WP_REST_Request $request) : mixed
Parameters
$address : array<string|int, mixed>
$request : WP_REST_Request

get_add_to_cart_args()

Return an array of arguments used to add a product to the cart.

protected get_add_to_cart_args(WP_REST_Request $request) : array<string|int, mixed>
Parameters
$request : WP_REST_Request
Tags
since
3.3.39
Return values
array<string|int, mixed>

get_default_shipping_method()

Returns a default shipping method based on the chosen shipping methods.

private get_default_shipping_method(array<string|int, mixed> $methods) : string
Parameters
$methods : array<string|int, mixed>
Return values
string

get_shipping_method_from_request()

private get_shipping_method_from_request(WP_Rest_Request $request) : array<string|int, mixed>
Parameters
$request : WP_Rest_Request
Tags
since
3.1.8
throws
Exception
Return values
array<string|int, mixed>

        
On this page

Search results