WC_Stripe_Controller_Cart_Trait
Tags
Table of Contents
Methods
- add_ready_to_calc_shipping() : mixed
- Method that hooks in to the woocommerce_cart_ready_to_calc_shipping filter.
- validate_shipping_address() : mixed
- get_add_to_cart_args() : array<string|int, mixed>
- Return an array of arguments used to add a product to the cart.
- get_shipping_method_from_request() : array<string|int, mixed>
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
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
Return values
array<string|int, mixed>get_shipping_method_from_request()
private
get_shipping_method_from_request(WP_Rest_Request $request) : array<string|int, mixed>
Parameters
- $request : WP_Rest_Request