The right to forage has been enshrined in British law since at least the 13th century. See Daniel Butler’s excellent article on the legalities – Has Foraging Gone Too Far?
Gathering Wild Plants – 1968 Theft Act
Section 4, subsection (3) A person who picks mushrooms growing wild on any land, or who picks flowers, fruit or foliage from a plant growing wild on any land, does not (although not in possession of the land) steal what he picks, unless he does it for reward or for sale or other commercial purpose.
For purposes of this subsection “mushroom” includes any fungus, and “plant” includes any shrub or tree.
Source: 1968 Theft Act
Uprooting Wild Plants – Wildlife and Countryside Act 1981
Section 13 of the Act states:
1.) Subject to the provisions of this Part, if any person—
(a) intentionally picks, uproots or destroys any wild plant included in Schedule 8; or
(b) not being an authorised person, intentionally uproots any wild plant not included in that Schedule, he shall be guilty of an offence.
2.) Subject to the provisions of this Part, if any person—
(a) sells, offers or exposes for sale, or has in his possession or transports for the purpose of sale, any live or dead wild plant included in Schedule 8, or any part of, or anything derived from, such a plant; or
(b) publishes or causes to be published any advertisement likely to be understood as conveying that he buys or sells, or intends to buy or sell, any of those things, he shall be guilty of an offence.
3.) Notwithstanding anything in subsection (1), a person shall not be guilty of an offence by reason of any act made unlawful by that subsection if he shows that the act was an incidental result of a lawful operation and could not reasonably have been avoided.
(4) In any proceedings for an offence under subsection (2)(a), the plant in question shall be presumed to have been a wild plant unless the contrary is shown.