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 | |
/** | |
* 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 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 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 | |
$meta_type = 'post'; // Type of object metadata is for (e.g., comment, post, or user). | |
$object_id = 0; // Set to 0 as it will be ignored. | |
$meta_key = 'color'; // The target "meta_key" value to delete. | |
$meta_value = ''; // Ignored when $delete_all is TRUE. | |
$delete_all = true; // True to delete matching metadata entries for all objects, ignoring the specified object_id. | |
delete_metadata( $meta_type, $object_id, $meta_key, $meta_value, $delete_all ); |
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 | |
/** | |
* Display widget ID on Widgets page. | |
* | |
* Use this to see the IDs of all of your widgets here: | |
* WordPress Admin Area > Appearance > Widgets | |
* | |
* To disable, simply comment out the add_filter() function. | |
* |
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 "sku" value as "ean" to $source. | |
* | |
* @param array $source | |
* @param WC_Product $product | |
* | |
* @return array Updated $source array. | |
*/ |
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
# 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 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 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 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 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 IS THE ONLY REQUIRED MODIFICATION!!! | |
* | |
* 1. GO HERE WordPress Admin Area > Pages > Add New | |
* 2. CREATE A NEW PAGE TO BE USED FOR DISPLAYING SEARCH RESULTS. | |
* 3. REPLACE "123" BELOW WITH THE ID OF YOUR NEW PAGE. | |
* | |
* Return the ID of the page to be used to display the search results. |
OlderNewer