Last active
October 13, 2019 00:56
-
-
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.
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 | |
/** | |
* 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