Skip to content

Instantly share code, notes, and snippets.

View sazzadh's full-sized avatar
💚
Ready for New

Sazzad Hussain sazzadh

💚
Ready for New
View GitHub Profile
@sazzadh
sazzadh / woocommerce-create-order.md
Created August 15, 2020 09:42 — forked from stormwild/woocommerce-create-order.md
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@sazzadh
sazzadh / youtube-id-from-url.php
Created August 17, 2018 12:04 — forked from galengidman/youtube-id-from-url.php
Get a YouTube video ID from any format of YouTube URL.
<?php
function youtube_id_from_url( $url = null ) {
if ( ! $url || ( stripos( $url, 'youtube.com' ) === false && stripos( $url, 'youtu.be' ) === false ) ) {
return false;
}
$parsed_url = parse_url( $url );
<?php
if (!class_exists('Tax_CTP_Filter')){
/**
* Tax CTP Filter Class
* Simple class to add custom taxonomy dropdown to a custom post type admin edit list
* @author Ohad Raz <[email protected]>
* @version 0.1
*/
class Tax_CTP_Filter
{
<?php
add_action('admin_init', 'add_meta_boxes', 1);
function add_meta_boxes() {
add_meta_box( 'repeatable-fields', 'Audio Playlist', 'repeatable_meta_box_display', 'post', 'normal', 'high');
}
function repeatable_meta_box_display() {
global $post;