2017-12-14 11:57:53 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Dummy widget class extending WC_Widget.
|
|
|
|
*/
|
|
|
|
class Dummy_Widget extends WC_Widget {
|
|
|
|
/**
|
|
|
|
* Constructor.
|
|
|
|
*/
|
|
|
|
public function __construct() {
|
|
|
|
$this->widget_cssclass = 'widget_dummy';
|
|
|
|
$this->widget_description = __( 'A dummy widget', 'woocommerce' );
|
|
|
|
$this->widget_id = 'wc_dummy_widget';
|
|
|
|
$this->widget_name = __( 'Dummy Widget', 'woocommerce' );
|
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Output widget.
|
|
|
|
*
|
2019-05-01 22:05:00 +00:00
|
|
|
* @param mixed $args Arguments.
|
2021-03-05 09:19:58 +00:00
|
|
|
* @param WP_Widget $instance Instance of WP_Widget.
|
2017-12-14 11:57:53 +00:00
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function widget( $args, $instance ) {
|
|
|
|
ob_start();
|
|
|
|
echo 'Dummy';
|
|
|
|
echo $this->cache_widget( $args, ob_get_clean() );
|
|
|
|
}
|
|
|
|
}
|