Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Porter simonporter007

View GitHub Profile
@simonporter007
simonporter007 / only_display_next_status.php
Created Sep 4, 2019
Merchant submitted code snippet to display only the next statuses configured with Order Status Manager for certain user roles
View only_display_next_status.php
<?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;
@simonporter007
simonporter007 / react-native-seed.sh
Last active Apr 11, 2018
react native project seed
View react-native-seed.sh
# 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
{