Useful hooks

How to Enable This Filter

To enable these filters, paste the code into the functions.php file of your active theme (preferably a child theme) by following these steps:

  • Go to Appearance → Theme File Editor in your WordPress dashboard, or access the file via FTP / file manager.

  • Open the functions.php file.

  • Paste the code at the bottom of the file and save.

Using a child theme is recommended to avoid losing changes during theme updates.

Disabling synchronization for selected products

To disable synchronization for selected products, add the following to the functions.php file of your theme:

add_filter('ei_disable_sync_product_ids', 'my_ei_disable_sync_product_ids');
function my_ei_disable_sync_product_ids() {
    return array(111, 222, 333, 444);
}

Replace 111, 222, 333, 444 with the actual product IDs.

Enabling synchronization only for selected products

/**
 * Only sync products 101, 202 and 303.
 *
 * @param int[] $ids  Current list of IDs to sync (empty by default).
 * @return int[]      Filtered list of IDs to sync.
 */
add_filter( 'ei_enable_sync_product_ids', function( $ids ) {
    // Override any existing list—only these three will be synced.
    return array( 101, 202, 303 );
} );

Allowing HTML and images in product descriptions

To disable description sanitization and include all images and HTML formatting from the source site, add the following to the functions.php file of your theme:

Import domain as brand taxonomy

For the Rehub theme only, to import the domain as the "brand" taxonomy, add the following to your functions.php file:

Custom parameters for scraping services

Last updated

Was this helpful?