Skip to content

Examples of custom code to use with Datafeedr plugins.

Notifications You must be signed in to change notification settings

datafeedr/my-custom-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Code Examples

In this repo you can find custom code examples to extend or modify how the Datafeedr plugins work.

How to Use

  1. Download this repo.
  2. Go here WordPress Admin Area > Plugins > Add New > [Upload Plugin]
  3. Upload the my-custom-code-main.zip plugin.
  4. Activate the My Custom Code plugin.
  5. Go here WordPress Admin Area > Plugins > Plugin Editor
  6. Select My Custom Code from the Select plugin to edit drop down menu.
  7. You will see a list of require_once statements and some will have // in front. If you want to use one of the modules, remove the preceeding // code.

Here's an example of some modules enabled and others not. In this example the first and last modules are enabled whereas the rest of the modules are disabled.

require_once 'modules/add-attribute-filter-to-admin-product-list.php';
//require_once 'modules/add-size-attribute-for-each-product.php';
//require_once 'modules/cloak-price-comparison-set-links.php';
//require_once 'modules/enable-product-update-feature-flag.php';
//require_once 'modules/exclude-specific-merchants-from-appearing-in-comparison-sets.php';
//require_once 'modules/limit-results-returned-by-comparison-set.php';
//require_once 'modules/normalize-merchant-attribute-names.php';
//require_once 'modules/prune-action-scheduler-actions-more-often.php';
//require_once 'modules/set-product-author-id-during-import.php';
//require_once 'modules/set-product-excerpt-equal-to-product-description.php';
require_once 'modules/sort-products-from-specific-merchants-last.php';

Modules

Here's a list of the modules included in this custom code plugin. You can activate or deactivate any of these modules at any time (see "How to use" above).

add-attribute-filter-to-admin-product-list.php

This module adds a new filter to the WordPress Admin Area > Products page which allows you to filter by an attribute value.

add-size-attribute-for-each-product.php

Adds size mapping for automatically adding size attributes to products.

clean-up-scheduled-actions.php

Automatically clean up specific scheduled actions by hook and status.

cloak-price-comparison-set-links.php

Adds the ability to cloak affiliate links in your Comparison Sets.

display-last-updated-date-under-buy-button.php

Displays the date the product was last updated with pricing info.

enable-product-update-feature-flag.php

Enabled the new Product Update feature flag. Learn more.

exclude-specific-merchants-from-appearing-in-comparison-sets.php

Exclude specific merchants from appearing in all of your Comparison Sets.

limit-results-returned-by-comparison-set.php

Limit the number of results displayed by a Comparison Set.

normalize-merchant-attribute-names.php

Modify merchant names before they are imported as product attributes.

prune-action-scheduler-actions-more-often.php

Prune completed actions created by the Action Scheduler every day (instead of every 30 days) and allow up to 500 actions to be deleted at a time.

set-product-author-id-during-import.php

Set the product's Author ID during product import.

set-product-excerpt-equal-to-product-description.php

Set the products short description (excerpt) equal to this description field if the shortdescription is unavailable.

set-visibility-to-hidden-for-unavailable-products.php

Set the visibility for unavailable products to "hidden".

sort-products-from-specific-merchants-last.php

Set products from specific merchants to sort last on category pages.

About

Examples of custom code to use with Datafeedr plugins.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages