How to add WooCommerce Add to Cart button in widget?

<?php /* Plugin Name: Keyframe Woocommerce Widget Description: Keyframe Woocommerce Add To Cart Sidebar Widget Author: Keyframe Version: 1.0 */ // Block direct requests if ( !defined(‘ABSPATH’) ) die(‘-1’); add_action( ‘widgets_init’, function(){ register_widget( ‘N_Widget’ ); }); /** * Adds N_Widget widget. */ class N_Widget extends WP_Widget { /** * Register widget with WordPress. */ function … Read more