Merge pull request #11323 from danielvonmitschke/class-wc-ajax-filter-hooks

Added two filter hooks in WC_AJAX class
This commit is contained in:
Claudio Sanches 2016-07-07 17:06:25 -03:00 committed by GitHub
commit 32f980518d
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class WC_AJAX {
* @return string
*/
public static function get_endpoint( $request = '' ) {
return esc_url_raw( add_query_arg( 'wc-ajax', $request, remove_query_arg( array( 'remove_item', 'add-to-cart', 'added-to-cart' ) ) ) );
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 ) );
}
/**
@ -2246,7 +2246,7 @@ class WC_AJAX {
$order->add_order_note( sprintf( __( 'Item #%s stock increased from %s to %s.', 'woocommerce' ), $order_item['product_id'], $old_stock, $new_quantity ) );
do_action( 'woocommerce_restock_refunded_item', $_product->id, $old_stock, $new_quantity, $order );
do_action( 'woocommerce_restock_refunded_item', $_product->id, $old_stock, $new_quantity, $order, $_product );
}
}
}