Skip to content

Instantly share code, notes, and snippets.

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

Aryan Chaurasia kulterryan

🏠
Working from home
View GitHub Profile
@kulterryan
kulterryan / reset_elementor_timer.js
Created January 23, 2024 07:32
Elementor Timer Reset
<script>
jQuery( document ).ready( function ( $ ) {
$(document).on( 'countdown_expire', function() {
Object.keys(localStorage)
.filter(key => key.endsWith('evergreen_interval'))
.forEach(key => localStorage
.removeItem((key)))
Object.keys(localStorage)
@kulterryan
kulterryan / kylasWooCommerce.php
Created May 25, 2023 17:22
Connect your KylasCRM with WooCommerce
<?php
// Kylas Integration
function kylasIntegration( $orderdata,$leadtype,$groupid) {
//echo "=============";echo "<pre>";print_r($orderdata);echo "</pre>";die;
if($leadtype=='abandoned'){
$leadtype=(int)1072133;
}
if($leadtype=='enrolled'){
$leadtype=(int)1072132;
}
@kulterryan
kulterryan / kr_default_password_after_login.php
Last active July 16, 2023 07:09
Set default password for every user in WordPress
<?php
add_action('user_register', 'kr_alter_password', 10, 1);
function kr_alter_password($user_id) {
// user email. $user return full user info
// new entered password (plain text)
if ( $user_id ) {
wp_set_password( "[your-password]", $user_id );
}
}
@kulterryan
kulterryan / swp_add_custom_javascript.php
Last active October 16, 2022 05:40
Add Javascript Codes in WordPress Function.php File
function swp_add_custom_javascript() {
?>
<script>
// Replace Javascript Codes Here
</script>
<?php
}
add_action('wp_head', 'swp_add_custom_javascript');
@kulterryan
kulterryan / swp_hide_plugin-mu.php
Last active September 30, 2022 05:12
Hide a WordPress Plugin from Plugin List
function mu_hide_plugins_network( $plugins ) {
// let's hide akismet
if( in_array( 'akismet/akismet.php', array_keys( $plugins ) ) ) {
unset( $plugins['akismet/akismet.php'] );
}
return $plugins;
}
add_filter( 'all_plugins', 'mu_hide_plugins_network' );