Methylates caffeoyl-CoA to feruloyl-CoA and 5-hydroxyferuloyl-CoA to sinapoyl-CoA. Plays a role in the synthesis of feruloylated polysaccharides. Involved in the reinforcement of the plant cell wall. Also involved in the responding to wounding or pathogen challenge by the increased formation of cell wall-bound ferulic acid polymers. (E)-caffeoyl-CoA + S-adenosyl-L-methionine = (E)-feruloyl-CoA + H(+) + S-adenosyl-L-homocysteine Binds 1 Mg(2+) ion per subunit. Aromatic compound metabolism; phenylpropanoid biosynthesis. Monomer. Mostly expressed in the bottom and middle parts of the stems. By wounding and viral infection. CoA moiety is essential to enzymatic activity since free caffeic acid is not a substrate for the enzyme. The N-terminal amino acid sequence of the protein seems to have a particular role in the enzyme-caffeoyl-CoA interaction. Belongs to the class I-like SAM-binding methyltransferase superfamily. Cation-dependent O-methyltransferase family. CCoAMT subfamily.