Merge pull request #19139 from woocommerce/fix/19116

Use relative scheme for ajax endpoint
This commit is contained in:
Claudio Sanches 2018-02-26 17:35:37 -03:00 committed by GitHub
commit e335c0b1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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' ), home_url( '/' ) ) ), $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( '/', 'relative' ) ) ), $request ) );
}
/**