Skip to content

Instantly share code, notes, and snippets.

View reandimo's full-sized avatar
🎯
Focusing on creating things.

Renan Diaz reandimo

🎯
Focusing on creating things.
View GitHub Profile
@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@paulund
paulund / example-wp-list-table.php
Last active May 20, 2024 05:29
An example code of using the WP_List_Table class. With Pagination.
<?php
/*
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI: http://www.paulund.co.uk
* Author: Paul Underwood
* Author URI: http://www.paulund.co.uk
* Version: 1.0
* License: GPL2
*/
@hal0gen
hal0gen / _mobile-ready-web-app.html
Last active May 12, 2024 08:35 — forked from tfausak/ios-8-web-app.html
iOS + Android settings for web applications
<!doctype html>
<!-- Adapted from https://gist.github.com/tfausak/2222823 -->
<html>
<head>
<title>Mobile-ready web app</title>
<!-- CONFIGURATION -->
@bagerathan
bagerathan / woo-events.js
Last active April 26, 2024 18:43
[Woocommerce Javascript events] #woo
//Woocommerce Checkout JS events
$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
//Woocommerce cart page JS events
$( document.body ).trigger( 'wc_cart_emptied' );
$( document.body ).trigger( 'update_checkout' );
<?php
/*
This script will allow you to send a custom email from anywhere within wordpress
but using the woocommerce template so that your emails look the same.
Created by craig@123marbella.com on 27th of July 2017
Put the script below into a function or anywhere you want to send a custom email
*/
@yidas
yidas / codeiginter-server-config.md
Last active March 1, 2024 01:30
Codeigniter 3 server configuration for Nginx & Apache

Codeigniter 3 server configuration for Nginx & Apache

Web Server Site Configuration

Recommended Apache Configuration

Use the following configuration in Apache's httpd.conf file or within a virtual host configuration. Note that you should set DocumentRoot and ServerName fit to your environment:

@shreyans94
shreyans94 / gist:05b10194cf2f57cf054a5cf3da3fd931
Created January 23, 2018 21:32
Display ACF for woocommerce variations in backend
// Render fields at the bottom of variations - does not account for field group order or placement.
add_action( 'woocommerce_product_after_variable_attributes', function( $loop, $variation_data, $variation ) {
global $abcdefgh_i; // Custom global variable to monitor index
$abcdefgh_i = $loop;
// Add filter to update field name
add_filter( 'acf/prepare_field', 'acf_prepare_field_update_field_name' );
// Loop through all field groups
$acf_field_groups = acf_get_field_groups();
foreach( $acf_field_groups as $acf_field_group ) {
@umidjons
umidjons / index.html
Last active January 6, 2024 18:46
Upload File using jQuery.ajax() with progress support
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload File using jQuery.ajax() with progress support</title>
</head>
<body>
<input type="file" name="file" id="sel-file"/>
@JeroenSormani
JeroenSormani / woocommerce-custom-order-action.php
Last active September 11, 2023 17:02
Add a new action to the order action drop down
add_action('woocommerce_order_actions', 'custom_wc_order_action', 10, 1 );
function custom_wc_order_action( $actions ) {
if ( is_array( $actions ) ) {
$actions['custom_action'] = __( 'My custom action' );
}
return $actions;
}
@bekarice
bekarice / wc-custom-order-action-sample.php
Created October 24, 2016 06:55
Add a WooCommerce custom order action
<?php // only copy if needed
/**
* Add a custom action to order actions select box on edit order page
* Only added for paid orders that haven't fired this action yet
*
* @param array $actions order actions array to display
* @return array - updated actions
*/
function sv_wc_add_order_meta_box_action( $actions ) {