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
add_action('wp_footer', 'add_bronto_json'); | |
function add_bronto_json() { | |
$brontoItems = []; | |
if( is_wc_endpoint_url( 'order-received' ) ): | |
if(isset($_GET['view-order'])) { | |
$order_id = $_GET['view-order']; |
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
$permalink = get_permalink( $product['product_id'] ); | |
$homeurl = home_url(); | |
if (strpos($permalink, $homeurl) == false){ | |
$permalink = $homeurl.$permalink; | |
} | |
$product_data['url'] = trailingslashit($permalink); |
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
$email = (isset($_POST['email']) ? $_POST['email'] : ''; | |
$sendTo = '[email protected]'; | |
$headers = 'From: '.$email.'' . "\r\n\\"; | |
if( $email != '' ) { | |
wp_mail($sendTo,'NaturVet.com Newsletter Subscriber', 'Please add '.$email.' to the NaturVet email list.', $headers); | |
} |
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 | |
add_filter('post_type_link', 'force_isle_category', 10, 2); | |
function force_isle_category($url, $post) { | |
$top_cat = null; | |
if ( class_exists( 'PSU' ) ){ | |
if ( 'product' == get_post_type( $post ) ) { | |
$product_cats = get_the_terms( $post->ID, 'product_cat' ); | |
foreach ($product_cats as $pc) { | |
if($pc->parent == 0){ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.