Merge pull request #16991 from woocommerce/fix/16988
Just use home_url for wc-ajax requests
This commit is contained in:
commit
a509161724
|
@ -32,7 +32,7 @@ class WC_AJAX {
|
|||
* @return string
|
||||
*/
|
||||
public static function get_endpoint( $request = '' ) {
|
||||
return esc_url_raw( apply_filters( 'woocommerce_ajax_get_endpoint', add_query_arg( 'wc-ajax', $request, remove_query_arg( array( 'remove_item', 'add-to-cart', 'added-to-cart' ), home_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ), $request ) );
|
||||
return esc_url_raw( apply_filters( 'woocommerce_ajax_get_endpoint', add_query_arg( 'wc-ajax', $request, remove_query_arg( array( 'remove_item', 'add-to-cart', 'added-to-cart' ), home_url( '/' ) ) ), $request ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue