Merge pull request #19777 from bekarice/tweak/filter-used-coupon-url

Filter the used coupon URL in "edit order" screen
This commit is contained in:
Mike Jolley 2018-04-18 16:55:23 +01:00 committed by GitHub
commit 9a8c47740d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -121,13 +121,13 @@ if ( wc_tax_enabled() ) {
<li class="<?php echo $class; ?>">
<?php if ( $post_id ) : ?>
<?php
$post_url = add_query_arg(
$post_url = apply_filters( 'woocommerce_admin_order_item_coupon_url', add_query_arg(
array(
'post' => $post_id,
'action' => 'edit',
),
admin_url( 'post.php' )
);
), $item, $order );
?>
<a href="<?php echo esc_url( $post_url ); ?>" class="tips" data-tip="<?php echo esc_attr( wc_price( $item->get_discount(), array( 'currency' => $order->get_currency() ) ) ); ?>">
<span><?php echo esc_html( $item->get_code() ); ?></span>