Skip to content

Instantly share code, notes, and snippets.

View rameshelamathi's full-sized avatar

Ramesh Elamathi rameshelamathi

View GitHub Profile
@rameshelamathi
rameshelamathi / change-recovery-url.php
Created November 2, 2021 05:29 — forked from iamsathyaseelan/change-recovery-url.php
change recovery url retainful
add_filter('retainful_recovery_redirect_url','retainful_recovery_redirect_url');
function retainful_recovery_redirect_url($url){
$url = wc_get_cart_url();
return $url;
}
@rameshelamathi
rameshelamathi / frontend.php
Created June 9, 2020 07:12 — forked from iamsathyaseelan/frontend.php
woo-lucky-wheel frontend/frontend.php(Line number: 661, 924, 931)
<?php
/*
Class Name: VI_WOO_LUCKY_WHEEL_Frontend_Frontend
Author: Andy Ha ([email protected])
Author URI: http://villatheme.com
Copyright 2015 villatheme.com. All rights reserved.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
@rameshelamathi
rameshelamathi / cancelled_as_abandoned.php
Last active March 11, 2020 06:17 — forked from iamsathyaseelan/change_order_Status.php
Snippet to treat cancelled and failed orders as abandoned carts.
add_filter('rnoc_abandoned_cart_order_status','rnoc_abandoned_cart_order_status',10,2);
function rnoc_abandoned_cart_order_status($order_status,$order){
if(in_array($order_status,array("cancelled","failed"))){
$order_status = "pending";
}
return $order_status;
}
<?php
// guest registration
function wc_register_guests( $order_id ) {
// get all the order data
$order = new WC_Order($order_id);
//get the user email from the order
$order_email = $order->billing_email;
@rameshelamathi
rameshelamathi / run.php
Last active February 1, 2017 10:36 — forked from lyrixx/run.php
Slack delete all your files (rewrite of https://gist.github.com/jamescmartinez/909401b19c0f779fc9c1)
<?php
<<<CONFIG
packages:
- "kriswallsmith/buzz: ^0.15.0"
- "symfony/console: ^3.2@dev"
CONFIG;
// Find you token on https://api.slack.com/docs/oauth-test-tokens
use Buzz\Message\Response;