This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Header Section | |
*/ | |
.wp-elements-6168ec0dc787a297453884a052a8bf6d { | |
background-color: #6FABAC !important; | |
padding-bottom: 30px !important; | |
} | |
.wp-elements-6168ec0dc787a297453884a052a8bf6d .wp-container-3 { | |
padding-top: 10px !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Unique customer ID | |
* | |
* @return string | |
*/ | |
function wpmu_unique_id() { | |
// Get current user object | |
$current_user = wp_get_current_user(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Install Tools | |
sudo apt install autoconf libpcre3-dev -y | |
## Define Module Name and Version | |
MODULE_NAME="apcu" | |
MODULE_VERSION="5.1.21" | |
## Download and Unzip Extensions | |
wget https://pecl.php.net/get/$MODULE_NAME-$MODULE_VERSION.tgz | |
tar -zxvf $MODULE_NAME-$MODULE_VERSION.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Migrate data from v2.0.4 to v2.1.0 | |
* | |
* run once | |
*/ | |
function fida_migrate_data() { | |
if ( get_option( 'fida_migrate_data_204' ) < 1 ) { | |
global $wpdb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Save referrer url in cookie | |
function set_referrer_cookie() { | |
$cookie_value = $_SERVER['HTTP_REFERER'] ?? null; // Get URL the user came to your site for | |
if ( !is_admin() && !isset($_COOKIE['origin'])) { // If not an admin or if cookie doesn't exist already | |
setcookie( 'origin', $cookie_value, time()+3600*24*30, COOKIEPATH, COOKIE_DOMAIN, false); // Set cookie for 30 days | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Automatically add a gift product when customer purchase anything. | |
* Use: Add this code in your theme's function.php file | |
*/ | |
function fida_add_gift_product_to_cart() { | |
global $woocommerce; | |
$cart_total = 1; |