Run this from WP CLI to generate sample item code data for all local products. Drop the file in your mu-plugins directory, then run:
dev/docker/wp.sh shell
localdev_populate_itemcodes();
exit();
Run this from WP CLI to generate sample item code data for all local products. Drop the file in your mu-plugins directory, then run:
dev/docker/wp.sh shell
localdev_populate_itemcodes();
exit();
| <?php | |
| use Tribe\Project\Post_Meta\Catalog_Integration; | |
| use Tribe\Project\Post_Types\Product\Product; | |
| use Tribe\Project\Taxonomies\Item_Code\Item_Code; | |
| use Tribe\Project\Taxonomies\Spec_Field\Spec_Field; | |
| use Tribe\Project\Taxonomies\Warranty\Warranty; | |
| use Tribe\Project\Taxonomy_Meta\Spec_Field_Attributes; | |
| function localdev_populate_itemcodes() { |
| <?php | |
| declare( strict_types=1 ); | |
| $wp_dir = '/application/www/wp/'; | |
| $preload_patterns = [ | |
| $wp_dir . "wp-includes/Text/Diff/Renderer.php", | |
| $wp_dir . "wp-includes/Text/Diff/Renderer/inline.php", | |
| $wp_dir . "wp-includes/SimplePie/**/*.php", | |
| $wp_dir . "wp-includes/SimplePie/*.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 ); |
| <?php | |
| /** | |
| * Plugin Name: Disable Plugin Deletion | |
| * Description: Disables the deletion of plugin files when running the uninstaller | |
| * Author: Jonathan Brinley | |
| * Version: 1.0.0 | |
| * Author URI: https://xplus3.net/ | |
| * License: GPLv2 or later | |
| */ |
| <?php | |
| function bc_cats_to_wp_cats( $category_ids ) { | |
| $query = new \WP_Term_Query(); | |
| return $query->query( [ | |
| 'taxonomy' => \BigCommerce\Taxonomies\Product_Category\Product_Category::NAME, | |
| 'meta_query' => [ | |
| [ | |
| 'key' => 'bigcommerce_id', |
| <?php | |
| /** | |
| * Class Image_Importer | |
| * | |
| * Imports an image from a URL and attaches it to a post | |
| */ | |
| class Image_Importer { | |
| private $image_url; | |
| private $attach_to_post_id; |
| [alias] | |
| ci = commit | |
| # View abbreviated SHA, description, and history graph of the latest 20 commits | |
| l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
| lol = log --graph --decorate --pretty=format:\"%h %ad | %s%d [%an]\" --date=short --abbrev-commit | |
| # View the current working tree status using the short format |
| #!/usr/bin/env bash | |
| docker_project_alias() | |
| { | |
| if [[ $1 == "core" ]]; then | |
| echo "global"; | |
| elif [[ $1 == "dw" ]]; then | |
| echo "dealerweb"; | |
| elif [[ $1 == "s1" ]] || [[ $1 == "sq" ]]; then | |
| echo "square"; |
| ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA8pZP+un2jGZnEpY3cbbAcAq3X8ZwIkvMlf7gzweb1EVp4e/wjRD5V4bct3U/xucAO9j5OjgmKHegNyIigUUbloxnmE2ArLH95d5fkXybN9WebnLxpDZtavqHftO17oosKaA+3TMKpAMt1rfgBRFMmY0pHyyYWSXzIgD1LWHEfeli+ALRwgLD5+kCOqqB73zwE5tQC4OWqIcAIcTSzPS9JhSdLjLwaUCdybTfPE6LvouXMEHoX4baK4E4WP1ZHT5kLUocJkA2g7iwUyk46OVck5O6VwflJRe0hmMNnzkQ3QCtKLSjXyz3JcqVyepkj4eZpt+1AYlBi/TQVVV/UcznSw== [email protected] |