Skip to content

Instantly share code, notes, and snippets.

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

Basilis Kanonidis Basilakis

🏠
Working from home
View GitHub Profile
@Basilakis
Basilakis / wp-query-ref.php
Created October 19, 2016 12:14 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@Basilakis
Basilakis / edd-create-coupon-slack.php
Created July 6, 2016 12:05 — forked from zackkatz/edd-create-coupon-slack.php
EDD Create Coupon from Slack - Allow creating a coupon `/coupon $20` or `/coupon 20%` in Slack
<?php
/*
Plugin Name: EDD Create Coupon from Slack
Plugin URL: http://gravityview.co
Description: Allow creating a coupon `/coupon [%]` in Slack
Version: 1.0
Author: Katz Web Services, Inc.
Author URI: http://katz.co
Contributors: katzwebservices
*/
@Basilakis
Basilakis / wc-admin-new-order-email-change-subject.php
Last active February 27, 2020 22:06 — forked from bekarice/wc-admin-new-order-email-change-subject.php
Add customer name to WooCommerce Admin New Order Email subject
// Adds customer first and last name to admin new order email subject
function skyverge_add_customer_to_email_subject( $subject, $order ) {
$subject = 'New Customer Order - (# ' . $order->get_order_number() . ') from ' . $order->get_billing_first_name() . ' ' . $order->get_billing_last_name();
return $subject;
};
add_filter( 'woocommerce_email_subject_new_order', 'skyverge_add_customer_to_email_subject', 10, 2 );
@Basilakis
Basilakis / wc-custom-order-status-icon.php
Created December 20, 2015 14:16 — forked from bekarice/wc-custom-order-status-icon.php
Add WooCommerce custom order status icon
/**
* Adds icons for any custom order statuses
* Tutorial: http://www.skyverge.com/blog/changing-woocommerce-custom-order-status-icons/
**/
add_action( 'wp_print_scripts', 'skyverge_add_custom_order_status_icon' );
function skyverge_add_custom_order_status_icon() {
if( ! is_admin() ) {
return;
}
@Basilakis
Basilakis / edd-custom-payment-statuses.php
Created December 20, 2015 14:14 — forked from bekarice/edd-custom-payment-statuses.php
Add custom EDD payment statuses
/**
* Adds new payment statuses to array of available statuses
*/
function sww_add_edd_payment_statuses( $payment_statuses ) {
$payment_statuses['invoice_paid'] = 'Invoice Paid';
$payment_statuses['in_progress'] = 'Project in progress';
return $payment_statuses;
}
@Basilakis
Basilakis / plugin.php
Created November 26, 2015 05:47 — forked from mathetos/plugin.php
Dependent Plugin Activation/Deactivation and Alert
<?php
/*
* Dependent Plugin Activation/Deactivation
*
* Sources:
* 1. https://pippinsplugins.com/checking-dependent-plugin-active/
* 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/
*
*/