WordPress at Your Fingertips
function is not described

WC_Admin_Addons::output_promotion_action() public WC 1.0

Output HTML for a promotion action.

{} It's a method of the class: WC_Admin_Addons{}

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Admin_Addons::output_promotion_action( $action );
$action(array) (required)
Array of action properties.

Code of WC_Admin_Addons::output_promotion_action() WC 5.9.0

<?php
public static function output_promotion_action( array $action ) {
	if ( empty( $action ) ) {
		return;
	}
	$style = ( ! empty( $action['primary'] ) && $action['primary'] ) ? 'addons-button-solid' : 'addons-button-outline-purple';
	?>
	<a
		class="addons-button <?php echo esc_attr( $style ); ?>"
		href="<?php echo esc_url( $action['url'] ); ?>">
		<?php echo esc_html( $action['label'] ); ?>
	</a>
	<?php
}