The Mac will receive the code and will be associated whenever you change the Apple ID since this feature is related to text message and your phone number actually havent changed. Go to the Mac and sign out of iMessage going to messages > option top left corner > Apple ID sign out > sign in with the secondary Apple ID > Sign in with another Apple ID into the message section > send and receive > sign in > activated Sell Best Sellers Prime Customer Service New Releases Todays Deals Pharmacy Books Registry Fashion Kindle Books Toys & Games Gift Cards Amazon Home Automotive Computers Coupons Shopper Toolkit Home Improvement Video Games Smart Home Find a Gift Beauty & Personal Care Health & Household Amazon Basics Pet Supplies TV & Video Baby Handmade Sports.
The solution for me was to logout of the iMessage icloud account under settings > message > Send and receive > Click on the Apple ID > sign out. I ve deleted the text forwarding message toggle accidently and couldn't receive anymore any text into the MacBook Pro.
I just got this problem coming with my Mac on Sierra and my iPhone on iOS 10.