Fix /wp-admin URLs
There are several places in the PRO plugin where URLs are hard-coded with `/wp-admin` path. Including in the installation procedure, ie. when generating the default affiliate and affiliate registration pages. And right now, I found more on the Creatives page under “View Creatives” and “Add New Creatives” buttons.
This is incompatible on WordPress websites which use a custom `/wp-admin` folder path, and results in the links/buttons going to 404 pages.
WordPress admin URLs should be generated using `admin_url(‘edit.php?post_type=wcu-creatives’);`, and shouldn’t assume a path of `/wp-admin`.


1 Comment
For testing purposes -- how to change `/wp-admin` to a custom path:
In `wp-config.php` add:
define( 'WP_ADMIN_DIR', 'my_custom_dir' );
define( 'ADMIN_COOKIE_PATH', '/' . WP_ADMIN_DIR );
In `.htaccess` add:
RewriteEngine On
RewriteRule ^my_custom_dir$ /my_custom_dir/ [R=301,L]
RewriteRule ^my_custom_dir/(.*) wp-admin/$2?%{QUERY_STRING} [L]
This request is closed for new comments.