Filter: tcp the buy button

Description

The “tcp_the_buy_button” filter is used to filter the default buy button.

Parameters

$html
(String) Blank string. Not in use.
$post_id
(Integer) The ID of the product. Defaults to the current product. In this case this tag must be within The Loop.

Example

<?php
function tcp_the_buy_button( $html, $post_id ) {
	return ' ** My buy button ' . $post_id . ' **';
}
add_filter( 'tcp_the_buy_button', 'tcp_the_buy_button', 10, 2 ); ?>

Change Log

Since 1.0.9