esc_html__( 'Display Alternate single product section.', 'acommerce' ), ) // Args ); } /** * Widget Form Section */ public function form( $instance ) { $acommerce_defaults = array( 'acommerce_alternate_category_product_sort_title' => '', 'acommerce_alternate_category_product_title' => '', 'acommerce_woo_category' => '', 'acommerce_number_of_products' => 2, 'acommerce_product_order' => 'DESC', 'acommerce_alternate_category_product_style' => 'style_1', ); $instance = wp_parse_args( (array) $instance, $acommerce_defaults ); //producte category get $acommerce_taxonomy = 'product_cat'; $acommerce_empty = 1; $acommerce_orderby = 'name'; $acommerce_show_count = 0; // 1 for yes, 0 for no $acommerce_pad_counts = 0; // 1 for yes, 0 for no $acommerce_hierarchical = 1; // 1 for yes, 0 for no $acommerce_title = ''; $acommerce_args = array( 'taxonomy' => $acommerce_taxonomy, 'orderby' => $acommerce_orderby, 'show_count' => $acommerce_show_count, 'pad_counts' => $acommerce_pad_counts, 'hierarchical' => $acommerce_hierarchical, 'title_li' => $acommerce_title, 'hide_empty' => $acommerce_empty ); //get Category $acommerce_all_categorys = get_categories( $acommerce_args ); ?>
'product', 'posts_per_page' => $acommerce_number_of_products, 'product_cat' => $acommerce_woo_category, 'order' => $acommerce_product_order, ); $acommerce_query = new WP_Query( $acommerce_product_args ); // Main Slider Section echo wp_kses_post( $before_widget ); ?>