Skip to content

Instantly share code, notes, and snippets.

View simonporter007's full-sized avatar

Simon Porter simonporter007

View GitHub Profile
@simonporter007
simonporter007 / react-native-seed.sh
Last active April 11, 2018 22:15
react native project seed
# TO BE RUN AFTER react-native init <project>
# Install eslint, babel and airbnb style guide
yarn add install eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y babel-eslint eslint-plugin-import eslint-import-resolver-babel-module babel-plugin-module-resolver babel-plugin-transform-object-rest-spread --dev
# Install chai, enzyme, husky, prettier-eslint, lint-stages
yarn add chai eslint-plugin-chai-friendly enzyme enzyme-adapter-react-16 husky lint-staged prettier-eslint --dev
# Install e2e test modules
yarn add selenium-standalone wdio-dot-reporter wdio-mocha-framework wdio-selenium-standalone-service --dev
./node_modules/.bin/eslint --init
cat >.eslintrc.json <<EOF
{
@simonporter007
simonporter007 / only_display_next_status.php
Created September 4, 2019 15:38
Merchant submitted code snippet to display only the next statuses configured with Order Status Manager for certain user roles
<?php // Only copy if required!
/**
* Custom code to display only the "next status" status for `orders_manager` role in the WooCommerce
* edit order screen - status selection, in order to keep to a specific order workflow.
*/
function hide_specific_order_statuses_for_user_role() {
global $post;