PHPackages                             truongwp/wp-redirect-with-error - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. truongwp/wp-redirect-with-error

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

truongwp/wp-redirect-with-error
===============================

Handle error when redirecting to other URL in WordPress.

0.1.1(9y ago)217MITPHP

Since May 31Pushed 8y ago1 watchersCompare

[ Source](https://github.com/truongwp/wp-redirect-with-error)[ Packagist](https://packagist.org/packages/truongwp/wp-redirect-with-error)[ RSS](/packages/truongwp-wp-redirect-with-error/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (3)Used By (0)

WordPress redirect with error
-----------------------------

[](#wordpress-redirect-with-error)

This class handles the error when redirecting to other URL in WordPress. Use simple URL parameter and nonce, don't use SESSION or COOKIE which not advised in WordPress.

### How to use?

[](#how-to-use)

Just include file `class-truongwp-redirect-with-error.php` in your theme or plugin or use Composer to install.

```
composer require "truongwp/wp-redirect-with-error >= 0.1.1"

```

Then create a function to store class instance globally.

```
