Skip to content

Instantly share code, notes, and snippets.

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

Nitin Yawalkar yawalkar

🏠
Working from home
View GitHub Profile
@yawalkar
yawalkar / woo-price-filter-widget-fix.php
Created October 25, 2016 08:07
Fixes WooCommerce price filter widget max price issue
// Override the woocommerce default filter for getting max price for filter widget.
add_filter( 'woocommerce_price_filter_widget_max_amount', 'theme_woocommerce_price_filter_widget_max_amount', 10, 2 );
/**
* Fix max_price issue in price filter widget.
*
* @param int $max_price The price filter form max_price.
* @return int Max price for the filter.
*/
function theme_woocommerce_price_filter_widget_max_amount( $max_price ) {
@aduth
aduth / stars-block.php
Last active February 15, 2022 04:13
Vue Custom Element Gutenberg Block
<?php
// NOTE: It would normally be recommended to split a block's JavaScript
// implementation to a separate file, but is authored here in a single
// file for convenience's sake.
//
// See: https://github.com/WordPress/gutenberg/pull/2791
/**
* Plugin Name: Stars Block
@bjornjohansen
bjornjohansen / wordpress-menu-cache.php
Last active October 9, 2024 00:30
WordPress Menu Cache
<?php
/**
* WordPress menu cache.
*
* @package BJ\Menu
* @author bjornjohansen
* @version 0.1.0
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Public License version 2 (GPLv2)
*/
@damiencarbery
damiencarbery / wc-defer-order-emails.php
Last active May 28, 2025 21:04
Defer WooCommerce emails for a few minutes - Defer WooCommerce emails for a specified time after the normal delivery time. https://www.damiencarbery.com/2020/04/defer-woocommerce-emails-for-a-few-minutes/
<?php
/*
Plugin Name: Defer WooCommerce emails for a few minutes (use Action Scheduler)
Plugin URI: https://www.damiencarbery.com/2020/04/defer-woocommerce-emails-for-a-few-minutes/
Description: Defer WooCommerce emails for a specified time after the normal delivery time. Use Action Scheduler instead of WP Cron. Call do_action() instead of remove_action() and calling trigger.
Author: Damien Carbery
Author URI: https://www.damiencarbery.com
Version: 0.11.20250528
*/
@ErMandeep
ErMandeep / sendinblue email by curl
Created November 17, 2020 17:53
sendinblue email by curl
<?php
$data = array(
"sender" => array(
"email" => '[email protected]',
"name" => 'sender email'
),
"to" => array(
@yawalkar
yawalkar / webhook-response.php
Created July 29, 2022 20:31
Customize the webhook response being sent to the source in FlowMattic
<?php
/**
* Alter the response sent from webhook to the source.
*
* @param array $response Original response being sent to the source.
* @param string $workflow_id The workflow ID.
* @param array $capture_data Data captured in the webhook.
*
* @return array
*/