This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$order = wc_get_order('18'); | |
$items = $order->get_items(); | |
foreach ( $order->get_items() as $item_id => $item ) { | |
// Here you get your data | |
$custom_field = wc_get_order_item_meta( $item_id, '_tmcartepo_data', true ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Document, Page } from 'react-pdf'; | |
import './App.css'; | |
import './font-awesome-4.7.0/css/font-awesome.min.css'; | |
//=================================================================================== | |
//=================================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
if (jQuery('body').hasClass('ie')){ | |
alert('ie'); | |
} else { | |
console.log('sub menu width'); | |
jQuery('.sub-menu').each(function() { | |
var width = 10; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>RSS Feed Reader</title> | |
</head> | |
<body> | |
<?php | |
//Feed URLs | |
$feeds = array( | |
"http://maxburstein.com/rss", | |
"http://www.engadget.com/rss.xml", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function new_us_simple_pdf_generate_cover_sheet( ) { | |
$postID = $_POST['postID']; | |
$siteRef1 = get_field('site_ref_1', $postID); | |
if (! class_exists ( 'TCPDF' )) { | |
require_once WP_PLUGIN_DIR . '/utility-search/pdf-gen/tcpdf_min/tcpdf.php'; | |
} | |
if (! class_exists ( 'pdfheader' )) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
const UTILITY_SEARCH_POST_TYPE = "utility-search"; | |
add_action("save_post_" . UTILITY_SEARCH_POST_TYPE, function ($post_ID, $post, $update) { | |
if (wp_is_post_autosave($post_ID)) { | |
return; | |
} | |
if (!$update) { // if new object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Set preffered countries for Caldera Forms phone fields | |
*/ | |
add_filter( 'caldera_forms_phone_js_options', function( $options){ | |
//Use ISO_3166-1_alpha-2 formatted country code | |
$options[ 'preferredCountries' ] = array( 'MX' ); | |
return $options; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Place this within the themes functions.php file */ | |
function is_tree($pid) { // $pid = The ID of the page we're looking for pages underneath | |
global $post; // load details about this page | |
if(is_page()&&($post->post_parent==$pid||is_page($pid))) | |
return true; // we're at the page or at a sub page | |
else | |
return false; // we're elsewhere | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
foreach( $order-> get_items() as $item_key => $item_values ): | |
$item_id = $item_values->get_id(); | |
$item_name = $item_values->get_name(); // Name of the product | |
$item_type = $item_values->get_type(); // Type of the order item ("line_item") | |
$product_id = $item_values->get_product_id(); // the Product id | |
$wc_product = $item_values->get_product(); // the WC_Product object | |
$item_data = $item_values->get_data(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.col-xs-15, | |
.col-sm-15, | |
.col-md-15, | |
.col-lg-15 { | |
position: relative; | |
min-height: 1px; | |
padding-right: 10px; | |
padding-left: 10px; | |
} | |
.col-xs-15 { |
NewerOlder