wc_get_cart_undo_url()
Gets the url to re-add an item into the cart.
Хуки из функции
Возвращает
Строку
. url to page
Использование
wc_get_cart_undo_url( $cart_item_key );
- $cart_item_key(строка) (обязательный)
- Cart item key to undo.
Список изменений
С версии 3.3.0 | Введена. |
Код wc_get_cart_undo_url() wc get cart undo url WC 9.8.1
function wc_get_cart_undo_url( $cart_item_key ) { $cart_page_url = wc_get_cart_url(); $query_args = array( 'undo_item' => $cart_item_key, ); return apply_filters( 'woocommerce_get_undo_url', $cart_page_url ? wp_nonce_url( add_query_arg( $query_args, $cart_page_url ), 'woocommerce-cart' ) : '', $cart_item_key ); }