It depends. As I understand it:
You can upgrade any time within 14 days of first use of your MYW Hopper tickets. The effective date for your AP will be the date of first use of the MYW tickets. The full cash cost of your MYW tickets will be applied against the APs. This applies whether you have the No Expiration option or not. If you have No Expiration and it's after the 14 days from first use, I believe you can apply the cash value of what is remaining on the MYW tickets, but the more days you've already used, the less that is worth.
If you are using the Disney Dining Plan during your stay, upgrade after you've used all the dining credits on DDP [or at least all you're planning on using]. If you upgrade before you've completed dining, the remaining credits will no longer be valid.