Skip to content

Instantly share code, notes, and snippets.

@xlplugins
xlplugins / wcct_modify_positions_thegem_theme.php
Created September 13, 2017 10:56
Change WooCommerce single product page positions for TheGem theme for Finale: WooCommerce Sales Countdown Timer & Discount Plugin
<?php
/**
* Add This whole code in working theme functions.php inside php tag to alter woocommerce native positions
* Theme: https://themeforest.net/item/thegem-creative-multipurpose-highperformance-wordpress-theme/16061685
* Finale: WooCommerce Sales Countdown Timer & Discount Plugin
*/
add_action('wp', 'thegem_wcct_modify_positions', 90);
if (!function_exists('thegem_wcct_modify_positions')) {
function thegem_wcct_modify_positions() {
if (function_exists('WCCT_Core')) {
@trajche
trajche / unzip.php
Last active September 28, 2022 18:17
Unzip a file on one.com with PHP
<?php
$unzip = new ZipArchive;
$out = $unzip->open('file-name.zip');
if ($out === TRUE) {
$unzip->extractTo(getcwd());
$unzip->close();
echo 'File unzipped';
} else {
echo 'Something went wrong?';