Skip to content

Instantly share code, notes, and snippets.

View a1iraxa's full-sized avatar

Ali Raza a1iraxa

View GitHub Profile
@a1iraxa
a1iraxa / xampp_php7_xdebug.md
Created August 10, 2017 08:41 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@a1iraxa
a1iraxa / wc_order_status_changes.php
Created September 14, 2017 14:38 — forked from abegit/wc_order_status_changes.php
WooCommerce Hooks for Order Status Changes
function mysite_pending($order_id) {
error_log("$order_id set to PENDING", 0);
}
function mysite_failed($order_id) {
error_log("$order_id set to FAILED", 0);
}
function mysite_hold($order_id) {
error_log("$order_id set to ON HOLD", 0);
}
function mysite_processing($order_id) {
@a1iraxa
a1iraxa / functions.php
Created September 29, 2017 10:33 — forked from WebEndevSnippets/functions.php
WooCommerce: Change Order Notes Placeholder Text
add_filter( 'woocommerce_checkout_fields', 'webendev_woocommerce_checkout_fields' );
/**
* Change Order Notes Placeholder Text - WooCommerce
*
*/
function webendev_woocommerce_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'Your custom placeholder';
return $fields;
}
@a1iraxa
a1iraxa / functions.php
Created October 2, 2017 14:53 — forked from ChromeOrange/functions.php
Change Single Product Tab Titles and Headings
<?php
/**
* Tab Title filters do not work with WooCommerce 1.6.5.1 or lower
* Please download this zip file http://cl.ly/2Y3S3D3M3C23 , extract the 3 files and copy them to :
* wp-content/themes/YOUR_THEME/woocommerce/single-product/tabs/
**/
add_filter ( 'woocommerce_product_description_tab_title', 'custom_product_description_tab_title' ) ;
function custom_product_description_tab_title() {
@a1iraxa
a1iraxa / Android TimeZone Ids
Created November 2, 2017 08:49 — forked from arpit/Android TimeZone Ids
List of all Android TimeZone ids
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
@a1iraxa
a1iraxa / wp_config.php
Created December 11, 2017 13:13 — forked from butlerblog/wp_config.php
Configure WordPress wp_mail function to send through SMTP server http://b.utler.co/Y3
<?php
/*
* Set the following constants in wp-config.php
* These should be added somewhere BEFORE the
* constant ABSPATH is defined.
*/
define( 'SMTP_USER', 'user@example.com' ); // Username to use for SMTP authentication
define( 'SMTP_PASS', 'smtp password' ); // Password to use for SMTP authentication
@a1iraxa
a1iraxa / README.md
Created January 23, 2018 10:15 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@a1iraxa
a1iraxa / woo-checkout-fields.php
Created March 2, 2018 13:12 — forked from bavington/woo-checkout-fields.php
Reorder Checkout Fields in WooCommerce
// Reorder Checkout Fields
add_filter('woocommerce_checkout_fields','reorder_woo_fields');
function reorder_woo_fields($fields) {
$fields2['billing']['billing_email'] = $fields['billing']['billing_email'];
$fields2['billing']['billing_first_name'] = $fields['billing']['billing_first_name'];
$fields2['billing']['billing_last_name'] = $fields['billing']['billing_last_name'];
$fields2['billing']['billing_country'] = $fields['billing']['billing_country'];
$fields2['billing']['billing_address_1'] = $fields['billing']['billing_address_1'];
$fields2['billing']['billing_address_2'] = $fields['billing']['billing_address_2'];
@a1iraxa
a1iraxa / googlemap.html
Created April 4, 2018 09:04 — forked from brittanydionigi/googlemap.html
pin cities on a google map based on city name & country
<!doctype>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Maps - pin cities</title>
<style type="text/css">
html, body { height: 100%; margin: 0; padding: 0; }
#map_canvas { height: 100%; }
</style>
@a1iraxa
a1iraxa / Date-Select-Markup.html
Created April 10, 2018 09:03 — forked from aleksblago/Date-Select-Markup.html
Markup: Select options for Month, Day, and Year.
<span>
<select name="month">
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>