WordPress at Your Fingertips
function is not described

WC_Admin_Addons::output_search_promotion_block() public WC 1.0

Output the HTML for the promotion block.

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Admin_Addons::output_search_promotion_block( $promotion );
$promotion(array) (required)
Array of promotion block data.

Code of WC_Admin_Addons::output_search_promotion_block() WC 5.9.0

<?php
public static function output_search_promotion_block( array $promotion ) {
	?>
	<div class="addons-wcs-banner-block">
		<div class="addons-wcs-banner-block-image">
			<img
				class="addons-img"
				src="<?php echo esc_url( $promotion['image'] ); ?>"
				alt="<?php echo esc_attr( $promotion['image_alt'] ); ?>"
			/>
		</div>
		<div class="addons-wcs-banner-block-content">
			<h1><?php echo esc_html( $promotion['title'] ); ?></h1>
			<p><?php echo esc_html( $promotion['description'] ); ?></p>
			<?php
			if ( ! empty( $promotion['actions'] ) ) {
				foreach ( $promotion['actions'] as $action ) {
					self::output_promotion_action( $action );
				}
			}
			?>
		</div>
	</div>
	<?php
}