Skip to content

Instantly share code, notes, and snippets.

View tuannguyenminh2086's full-sized avatar
🏠
Working from home

Nguyen Minh Tuan tuannguyenminh2086

🏠
Working from home
  • Ho Chi Minh, Vietnam
  • 04:49 (UTC +07:00)
View GitHub Profile
@tuannguyenminh2086
tuannguyenminh2086 / woo-events.js
Created October 29, 2021 04:03 — forked from bagerathan/woo-events.js
[Woocommerce Javascript events] #woo
//Woocommerce Checkout JS events
$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
//Woocommerce cart page JS events
$( document.body ).trigger( 'wc_cart_emptied' );
$( document.body ).trigger( 'update_checkout' );
<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {
<?php
/**
* Checkout Form
*
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
@tuannguyenminh2086
tuannguyenminh2086 / .eslintrc.js
Created July 5, 2020 08:26 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@tuannguyenminh2086
tuannguyenminh2086 / gist:e8e56d3bcf4fed94de0cfce124cfb154
Created September 23, 2019 09:29 — forked from thachpham92/gist:d57b18cf02e3550acdb5
Tất cả các tham số trong WP_Query
// Source: https://gist.github.com/luetkemj/2023628
// Xem hướng dẫn WP_Query toàn tập: http://goo.gl/kRpzTz
<?php
$args = array(
//////Author Parameters - Tham số lấy bài viết theo tác giả
//http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters
'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20)
'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả
'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả
var gulp = require('gulp'),
gutil = require('gulp-util'),
uglify = require('gulp-uglify'),
header = require('gulp-header'),
filter = require('gulp-filter'),
concat = require('gulp-concat'),
browserSync = require('browser-sync'),
sass = require('gulp-sass'),
bodyParser = require('body-parser'),
express = require('express'),