This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Order by payment method | |
* Add payment method bulk filter for orders | |
*/ | |
function add_filter_by_payment_method_orders() { | |
global $typenow; | |
if ( 'shop_order' === $typenow ) { | |
// get all payment methods | |
$gateways = WC()->payment_gateways->payment_gateways(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.keen-slider__slide { | |
min-width: calc(100% + 0px); | |
max-width: calc(100% + 0px); | |
transform: translate3d(0, 0, 0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~* \.(jpg|jpeg|png|gif|ico|svg|woff|woff2|css|js|webp)$ { | |
expires 365d; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from "react"; | |
const useExperiment = ( | |
experimentId, | |
defaultVariant, | |
event = "optimize.activate" | |
) => { | |
const [variant, setVariant] = useState(defaultVariant); | |
useEffect(() => { | |
if (window.dataLayer) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE pm1 | |
FROM wp_postmeta pm1, | |
wp_postmeta pm2 | |
WHERE | |
pm1.meta_key = '_stock' | |
AND pm2.meta_key = '_stock' | |
AND pm1.post_id = pm2.post_id | |
AND pm1.meta_id < pm2.meta_id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!wp_next_scheduled('set_last_month_product_sales_hook')) { | |
wp_schedule_event(time(), 'daily', 'set_last_month_product_sales_hook'); | |
} | |
add_action('set_last_month_product_sales_hook', 'cc_set_last_month_sales'); | |
function cc_set_last_month_sales() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import ReactSVG from 'react-svg' | |
import ResultItem from '@/components/Search/Result' | |
export default class Search extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { | |
results: [], | |
isSearchbarVisible: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
// Fires when an Ajax form submission has completed successfully, and mail has been sent. | |
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
// Get input type file element | |
var inputFile = $('.wpcf7-drag-n-drop-file'); | |
// Reset upload list for multiple fields | |
if( inputFile.length > 0 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Colors | |
$brand-primary: #27ae60; | |
$fa-font-path: '~font-awesome/fonts'; | |
$brand-white: #fff; | |
$brand-grey: #929095; | |
$brand-violet: #5d0e8b; | |
$brand-violet-link: #5d2c85; | |
$brand-violet-light: #8d1179; | |
$brand-violet-button: #c114a2; | |
$brand-violet-active: #b63293; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Setting up the query | |
$post_type_name = 'faculty'; | |
$taxonomy_name = 'faculty-type'; | |
$terms_arr = get_terms($taxonomy_name); | |
$terms_to_loop = returnTermsSlug($terms_arr); | |
function returnTermsSlug($termsArr) { | |
$a = []; | |
foreach ($termsArr as $term) { |
NewerOlder