Skip to content

Instantly share code, notes, and snippets.


Santanu Patra santanup789

View GitHub Profile
santanup789 / ajaxsfilter.js
Last active Sep 18, 2020
Woocommerce product multiple term checkbox filtering by simple ajax [category + color + price]
View ajaxsfilter.js
var filter = $('#filter');
data:filter.serialize(), // form data
type:filter.attr('method'), // POST
//filter.find('button').text('Processing...'); // changing the button label
$('#appendTable').html('<label class="alert">Processing...</label>');
santanup789 / functions.php
Last active Feb 14, 2020
Get total sale by product amount in woocommerce
View functions.php
function dw_product_totals() {
global $wpdb;
$post = get_post( $post_id );
$current_product = get_the_ID($post);
$order_items = apply_filters( 'woocommerce_reports_top_earners_order_items', $wpdb->get_results( "
View 2d_push_button.html
<!DOCTYPE html>
<title>My Website</title>
<meta charset="UTF-8" />
<style type="text/css">
height: 180px;
width: 180px;