コード例 #1
0
<?php

$wishlist = new WC_Wishlists_Wishlist($_GET['wlid']);
?>

<?php 
$current_owner_key = WC_Wishlists_User::get_wishlist_key();
$sharing = $wishlist->get_wishlist_sharing();
$sharing_key = $wishlist->get_wishlist_sharing_key();
$wl_owner = $wishlist->get_wishlist_owner();
$notifications = get_post_meta($wishlist->id, '_wishlist_owner_notifications', true);
if (empty($notifications)) {
    $notifications = 'yes';
}
$wishlist_items = WC_Wishlists_Wishlist_Item_Collection::get_items($wishlist->id, true);
$treat_as_registry = false;
?>

<?php 
if ($wl_owner != WC_Wishlists_User::get_wishlist_key() && !current_user_can('manage_woocommerce')) {
    die;
}
?>

<?php 
do_action('woocommerce_wishlists_before_wrapper');
?>
<div id="wl-wrapper" class="product woocommerce"> <!-- product class so woocommerce stuff gets applied in tabs -->

	<?php 
if (function_exists('wc_print_messages')) {
コード例 #2
0
    echo $product->is_type('variable') ? 'hide' : '';
    ?>
" >

	<?php 
    if (woocommerce_wishlists_get_wishlists_for_product($product->id)) {
        ?>
		<div class="wl-already-in">
			<?php 
        _e('This item is already in one of your wishlists:', 'wc_wishlist');
        ?>
				<?php 
        foreach (woocommerce_wishlists_get_wishlists_for_product($product->id) as $list_id) {
            ?>
						<a href="<?php 
            echo WC_Wishlists_Wishlist::get_the_url_edit($list_id);
            ?>
" title="<?php 
            echo get_the_title($list_id);
            ?>
"><?php 
            echo get_the_title($list_id);
            ?>
</a>
				<?php 
        }
        ?>
		</div>
    <?php 
    } else {
        ?>