Improved WC_AJAX->get_endpoint()

This commit is contained in:
Claudio Sanches 2017-09-27 12:07:27 -03:00
parent 39baa2c488
commit 5721bc6044
1 changed files with 1 additions and 1 deletions

View File

@ -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' ) ) ), $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( $_SERVER['REQUEST_URI'] ) ) ), $request ) );
}
/**