This file contains 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
const threedayevent = [{ | |
"id": "precons", "name": "PreCons", "date": "2024/09/23", "rows": [[{ | |
"track": 79, "day": 23, "include": [], "exclude": [], "columns": 3, "title": "Track A PreConference Sessions" | |
},{ | |
"track": 80, "day": 23, "include": [], "exclude": [], "columns": 3, "title": "Track B PreConference Sessions" | |
}], [{ | |
"track": 82, "day": 23, "include": [], "exclude": [], "columns": 3, "title": "Evening Events" | |
}]] | |
}, { |
This file contains 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
SELECT post_id FROM wp_postmeta WHERE meta_key = 'expiry_date' AND meta_value <= '2015-09-18' AND meta_value != ''; |
This file contains 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 | |
class Advanced_Search { | |
public $version = 1; | |
public function __construct() { | |
// WordPress Hooks | |
$this->hooks(); | |
} |
This file contains 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
SELECT order_id, order_item_name FROM kt_woocommerce_order_items WHERE order_item_name IN ( | |
'The Best of The Digital Photography Book Series', #1605950 | |
'How Do I Do That In Lightroom?', #1564501 | |
'The Headshot: The Secrets to Creating Amazing Headshot Portraits', #1542682 | |
'(Spiral Bound) The Adobe Photoshop Lightroom CC Book for Digital Photographers', #1475578 | |
'The Adobe Photoshop Lightroom CC Book for Digital Photographers (Paperback)', #1446548 | |
'It’s Not About The f-Stop', #1383012 | |
'The Photoshop Elements 13 Book for Digital Photographers', #1286356 | |
'The Adobe Photoshop CC Book for Digital Photographers', #1090080 | |
'Light, Gesture & Color', #1090070 |
This file contains 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
$protection_engine = new MM_ProtectedContentEngine(); | |
$attached_bundle = $protection_engine->getPostAccessRights( $course_id ); | |
$bundle_id = $attached_bundle[0]->access_id; | |
$bundle = new MM_Bundle( $bundle_id ); | |
$associated_product_id = key( $bundle->getAssociatedProducts() ); | |
$associated_product = new MM_Product( $associated_product_id ); | |
$buy_link = add_query_arg( array( 'rid' => $associated_product->getReferenceKey() ), home_url( '/' ) . 'checkout/' ); |
This file contains 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 | |
$args = array( | |
'post_type' => 'sfwd-courses', | |
'orderby' => 'rand', | |
'no_found_rows' => 1, | |
'posts_per_page'=> 2, | |
'author' => $post->post_author, // Needs the current Course Author ID | |
'post__not_in' => array( $post->ID ), // Needs the current Course ID | |
); |
This file contains 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 | |
/* Output the Tab's content */ | |
add_action( 'woocommerce_product_data_panels', 'internal_comments_data_panel' ); | |
function internal_comments_data_panel() { | |
?> | |
<div id="internal_comments_data" class="panel woocommerce_options_panel" style="display: none;"> | |
<div class="options_group"> | |
<?php | |
woocommerce_wp_textarea_input( | |
array( 'id' => '_internal_notes', |
This file contains 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 | |
/* Register New Tab */ | |
add_filter( 'woocommerce_product_data_tabs', 'register_internal_comments_data_tab' ); | |
function register_internal_comments_data_tab( $data_tabs ) { | |
$internal_comments = array( | |
'internal_comments' => array( | |
'label' => __('Internal Comments', 'spyr'), | |
'target' => 'internal_comments_data', | |
'class' => array(), | |
), |
This file contains 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 | |
/** | |
* Will extract the Variation ID if available otherwise it will get the Product ID | |
* @param $product Product | |
* @param bool $check_variations Whether or not to check for variation IDs | |
* @return mixed | |
*/ | |
function get_id_from_product( $product, $check_variations = true ) { | |
// Are we taking variations into account? | |
if( $check_variations ) { |
This file contains 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 | |
// Product From A Category AND Minimum Cart Total | |
function qualifies_for_incentive() { | |
// Incentive product we are giving away | |
$incentive_product_id = 102; | |
if( qualifies_basedon_product_category( 'premium-quality' ) | |
&& qualifies_basedon_cart_total( 199 ) ) { | |
add_incentive_to_cart( $incentive_product_id ); | |
} else { |
NewerOlder