\WP_Stager_Integration\Component::render_ticket_shop_widget_basic(array $args = array()): void
\WP_Stager_Integration\Component::render_ticket_shop_widget_basic(array $args = array()): voidDescription
Render the Stager "basic" widget component.
Example:
// Render the "Basic" widget with "embedded" render type and "single-event" initial load page
\WP_Stager_Integration\Component::render_ticket_shop_widget_basic( array(
'widget_options' => array(
'renderType' => 'embedded',
'initialLoadPage' => 'single-event',
),
) );
// Render the "Basic" widget with "fullscreen" render type and "events" initial load page
\WP_Stager_Integration\Component::render_ticket_shop_widget_basic( array(
'widget_options' => array(
'renderType' => 'fullscreen',
'initialLoadPage' => 'events',
),
) );Parameters:
| Parameter | Type | Description |
|---|---|---|
$args['widget_options'] | array | Array of options to pass to the widget initialization function. |
Returns:
void
Information
| File | class-component.php line 766 |
|---|
Full Code
/**
* Render the Stager "basic" widget component.
*
* @param array $args {
* (Optional) Arguments to pass to the widget.
*
* @type array $widget_options Array of options to pass to the widget initialization function.
* }
*
* @return void
*
* @example
* // Render the "Basic" widget with "embedded" render type and "single-event" initial load page
* \WP_Stager_Integration\Component::render_ticket_shop_widget_basic( array(
* 'widget_options' => array(
* 'renderType' => 'embedded',
* 'initialLoadPage' => 'single-event',
* ),
* ) );
*
* // Render the "Basic" widget with "fullscreen" render type and "events" initial load page
* \WP_Stager_Integration\Component::render_ticket_shop_widget_basic( array(
* 'widget_options' => array(
* 'renderType' => 'fullscreen',
* 'initialLoadPage' => 'events',
* ),
* ) );
*/
public static function render_ticket_shop_widget_basic( $args = array() ) {
// Get data
$has_feature_ticket_shops = (bool) Options::has_ticket_shops();
// Bail if feature is not enabled
if ( ! $has_feature_ticket_shops ) {
return;
}
// Render the component
self::render( 'basic', 'template-parts/shop-widgets', $args );
}💡 If you ever get stuck or have a question, please check our FAQs, our Free Integration Service, our paid Full Integration Service, or reach out to us!

Get WP Stager Integration
🎁 Limited offer: Use code WELCOME26 to get your first month for free!

