Skip to content

Instantly share code, notes, and snippets.

View GuruWithin's full-sized avatar

GuruWithin GuruWithin

  • India
  • 00:06 (UTC +05:30)
View GitHub Profile
@GuruWithin
GuruWithin / nginx.site.conf
Last active June 19, 2019 15:06
PHP 7.2 Nginx Config with SSL
server {
listen 443 default_server;
server_name example.com www.example.com;
access_log /srv/www/example.com/logs/access.log;
error_log /srv/www/example.com/logs/error.log;
root /srv/www/example.com/public;
index index.php index.html;
@GuruWithin
GuruWithin / gist:32d12cc03d5ff3a2dfa8b285890bb029
Created November 12, 2016 07:54 — forked from corsonr/gist:6775121
WooCommerce - Product already in cart, change "add to cart" text
<?php
/**
* Change the add to cart text on single product pages
*/
add_filter('woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text');
function woo_custom_cart_button_text() {
foreach( WC()->cart->get_cart() as $cart_item_key => $values ) {