Automattic\WooCommerce\Blocks\BlockTypes
AddToCartForm::add_to_cart_form_action()
Use current url as the add to cart form action.
Method of the class: AddToCartForm{}
No Hooks.
Return
String
. The current URL.
Usage
$AddToCartForm = new AddToCartForm(); $AddToCartForm->add_to_cart_form_action();
AddToCartForm::add_to_cart_form_action() AddToCartForm::add to cart form action code WC 9.8.1
public function add_to_cart_form_action() { global $wp; return home_url( add_query_arg( $_GET, $wp->request ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended }