Skip to content

Instantly share code, notes, and snippets.

View Rafo1994's full-sized avatar

Rafael Rafo1994

  • GoWP
View GitHub Profile
@Rafo1994
Rafo1994 / functions.php
Created October 27, 2021 15:48
Adjust generate coupon length for AutomateWoo
//Add this code to functions.php - this code changes lenght of coupons generated
//only by customer.generate_coupon variable in AutomateWoo
add_filter( 'automatewoo/coupon_generator/key_length', function(){
return 3; //Change this number to any number you like
});
@Rafo1994
Rafo1994 / updraft_sort.py
Last active July 7, 2023 12:39
Move Updraft plus backups and sort them by date in folders
import os
import re
import shutil
# Change absolute path to location where backups are stored
path = "ADD YOUR PATH"
if not path.endswith("/"):
path += "/"