filter: tcp get buy buttons paths

Description

The “tcp_get_buy_buttons_paths” filter allows to add more paths where to find for possible “buy buttons files”. This function would be useful for plugins that want to add more “buy buttons” templates. This templates could be selected from the products setup panel.

Example

<?php
function tcp_get_buy_buttons_paths( $paths ) {
	$paths[] = array(
		'label'	=> 'buy_button_1',
		'path'	=> dirname( __FILE__ ) . '/templates/buy_button_1_folder',
	);
	$paths[] = array(
		'label'	=> 'buy_button_2',
		'path'	=> dirname( __FILE__ ) . '/templates/buy_button_2_folder',
	);
	return $paths;
}

add_filter( 'tcp_get_buy_buttons_paths', 'tcp_get_buy_buttons_paths' ); ?>

Change Log

Since 1.0.9

Related