Skip to content

Instantly share code, notes, and snippets.

View oralunal's full-sized avatar

Oral ÜNAL oralunal

View GitHub Profile
@renancmfreitas
renancmfreitas / gist:01cb079755c9998c3b0dfd226a16e881
Created July 10, 2016 14:31
WooCommerce Auto Restore Stock (modified) - Add function restore pending order
<?php
/**
* Plugin Name: WooCommerce Auto Restore Stock
* Plugin URI: http://gerhardpotgieter.com/tag/woocommerce-auto-restore-stock
* Description: Auto restore stock when orders are cancelled
* Version: 1.0.1
* Author: Gerhard Potgieter
* Author URI: http://gerhardpotgieter.cim
* License: GPL2
*/
@derekclee
derekclee / default.vcl
Last active July 15, 2022 09:52
Varnish Cache Set CORS headers
sub vcl_deliver {
if (req.url ~ "/fonts/") {
set resp.http.Access-Control-Allow-Origin = "*";
set resp.http.Access-Control-Allow-Methods = "GET, OPTIONS";
set resp.http.Access-Control-Allow-Headers = "Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token";
}
}