Fix https://github.com/affiliatewp/AffiliateWP/issues/286