Considering SSD upgrade for 13" Mid-2012 MacBook Pro
OS X 10.11, El Capitan, does not include specific code to prevent the use of a third party Solid State Disk (SSD).

I have replaced my MacBook Pro's Hard Disk Drive (HDD) with a Samsung SSD; the MacBook is running OS X 10.11.

With regard to TRIM support on non-Apple installed drives, see Should I enable TRIM with a third party (non-Apple) SSD?