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
<?php | |
/** | |
* Import a different image field than the default "image" field if a more desired field exists. | |
* | |
* Some merchants provide a larger version of their images in other fields than the image field. This code allows | |
* you to import those large images instead of the smaller ones if the larger ones are available. | |
* | |
* @param array $meta An array of meta values. | |
* @param array $post An array of post data including ID, post_title, post_status, etc... |
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
<?php | |
/** | |
* Change the currency symbol for the WooCommerce product to match the currency | |
* of the product supplied by the Datafeedr API. | |
* | |
* @see dfrapi_currency_code_to_sign() | |
* @global WC_Product $product | |
* | |
* @param string $currency_symbol Current currency symbol. |
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
<?php | |
/** | |
* Replace the price of a WooCommerce product with the lowest price of a cached comp set. | |
* | |
* Example: From $29.99 | |
* | |
* @param string $price Price wrapped in HTML markup. | |
* @param WC_Product $product | |
* |
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
<?php | |
/** | |
* This custom code forces all product links to link to the merchant's | |
* site instead of the single product's page. | |
* | |
* @param string $post_link The post's permalink. | |
* @param WP_Post $post The post in question. | |
* @param bool $leavename Whether to keep the post name. | |
* @param bool $sample Is it a sample permalink. |
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
<?php | |
/** | |
* Add "sku" value as "ean" to $source. | |
* | |
* @param array $source | |
* @param WC_Product $product | |
* | |
* @return array Updated $source array. | |
*/ |
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
<?php | |
/** | |
* Limit the total number of results in a Comparison Set to 5. | |
* | |
* Change the value of $max_results to modify the number of results returned. | |
* | |
* @param array $filtered_products Array of products after pre-filters have been run. | |
* @param array $all_products Array of products before any pre-filters have been run. | |
* |
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
# Any file or directory | |
find /home/USERNAME/public_html/ -perm 0777 | |
# Only files | |
find /home/USERNAME/public_html/ -type f -perm 0666 |
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
<?php | |
/** | |
* Map each affiliate network ID to your affiliate ID for that network. | |
* | |
* In this example, Commission Junction's network ID is 3 and my Commission | |
* Junction affiliate ID is '321321321'. | |
*/ | |
$affiliate_ids = array( | |
3 => '321321321', // Commission Junction Affiliate ID. |
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
<?php | |
/** | |
* Map each affiliate network ID to your affiliate ID for that network. | |
* | |
* In this example, Commission Junction's network ID is 3 and my Commission | |
* Junction affiliate ID is '321321321'. | |
*/ | |
$affiliate_ids = array( | |
3 => '321321321', // Commission Junction Affiliate ID. |