Skip to content

Instantly share code, notes, and snippets.

@ajithrn
ajithrn / custom-events-wp_query.php
Created May 2, 2022 15:51 — forked from jo-snips/custom-events-wp_query.php
The Events Calendar - Custom Query Using WP_Query
<?php
$args = array(
'post_status'=>'publish',
'post_type'=>array(TribeEvents::POSTTYPE),
'posts_per_page'=>10,
//order by startdate from newest to oldest
'meta_key'=>'_EventStartDate',
'orderby'=>'_EventStartDate',
'order'=>'DESC',
@ajithrn
ajithrn / $email variable
Created September 15, 2022 21:12
WooCommerce Order Info From $order Object
// Get $order object from $email
$order = $email->object;
// Now you have access to (see above)...
if ( $order ) {
$order->get_id();
$order->get_formatted_order_total( );
// etc.
@ajithrn
ajithrn / cyberpanel-user-create.sh
Created May 1, 2024 21:24
Script to create bulk user on cyberpanel using CLI and export credentials.
#!/bin/bash
# Create the CSV file with header
echo "url,username,password" > credentials.csv
# Define a string of possible characters for the password
char_pool="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
counter=0
for i in {a..z}; do