Created
April 14, 2017 17:30
-
-
Save cmunns/4ef01e39e79979333117cf82a9cbe9d5 to your computer and use it in GitHub Desktop.
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
$permalink = get_permalink( $product['product_id'] ); | |
$homeurl = home_url(); | |
if (strpos($permalink, $homeurl) == false){ | |
$permalink = $homeurl.$permalink; | |
} | |
$product_data['url'] = trailingslashit($permalink); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment