WDVV equation and triple-product relation