Same as last commit
authorLaury GvR <laury@gaslightmedia.com>
Thu, 15 Dec 2016 18:38:31 +0000 (13:38 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Thu, 15 Dec 2016 18:38:31 +0000 (13:38 -0500)
parts/glm-blocks.php

index 96fab9a..b263692 100644 (file)
@@ -4,8 +4,9 @@
         glm_blocks_show();
         echo '<br>';
         echo '<div class="block-button">';
-        if (get_term_link( 236 ,'product_cat')) {
-            echo '<label><a href="'.get_term_link( 236 ,'product_cat').'">Donate Now</a></label>';
+        $link = get_term_link( 236, 'product_cat');
+        if ( !is_wp_error( $link ) ) {
+            echo '<label><a href="'.$link.'">Donate Now</a></label>';
         }
         echo '</div>';
         echo '</div>';