Skip to content

Instantly share code, notes, and snippets.

@jbrinley
Last active October 13, 2019 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbrinley/d162a0f5e33fb9fc0a2bb8f3cc558756 to your computer and use it in GitHub Desktop.
Save jbrinley/d162a0f5e33fb9fc0a2bb8f3cc558756 to your computer and use it in GitHub Desktop.
A plugin to disable cron-initialized imports on a BigCommerce for WordPress site. Drop this file in /wp-content/mu-plugins, or add the snippet to your theme's functions.php.
<?php
/**
* Removes the cron trigger for a BigCommerce import. It is still possible to
* run an import manually by clicking the "Sync Products" button in the admin,
* or by running the import from the command line.
*/
add_action( 'bigcommerce/init', function( $plugin ) {
remove_action( 'bigcommerce_start_import', $plugin->import->cron_start, 10 );
}, 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment