Beispiel #1
0
 function change_cancel_order_url_try( $redirect = '' ) {

    // Get cancel endpoint
    
    $cancel_endpoint = WC_Abstract_Order::get_cancel_endpoint();

    return apply_filters( 'woocommerce_get_cancel_order_url_raw', add_query_arg( array(
      'cancel_order' => 'true',
      'order'        => $this->order_key,
      'order_id'     => $this->id,
      'redirect'     => $redirect,
      '_wpnonce'     => wp_create_nonce( 'woocommerce-cancel_order' )
    ), $cancel_endpoint ) );
  }