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 | |
function jk_add_custom_sku() { | |
$args = array( | |
'label' => __( 'Custom SKU', 'woocommerce' ), | |
'placeholder' => __( 'Enter custom SKU here', 'woocommerce' ), | |
'id' => 'jk_sku', | |
'desc_tip' => true, | |
'description' => __( 'This SKU is for internal use only.', 'woocommerce' ), | |
); |
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 | |
/** | |
* Email Order Items | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-items.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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
/** | |
* BLOCK: wpmastery-code-block | |
* | |
* Registering a basic block with Gutenberg. | |
* Simple block, renders and saves the same content without any interactivity. | |
*/ | |
// Import CSS. | |
import './style.scss'; | |
import './editor.scss'; |
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
// Remove the default comments from Astra. | |
add_action( | |
'init', | |
function() { | |
if ( class_exists( 'Astra_Loop' ) ) { | |
remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_comments' ), 15 ); | |
} | |
}, | |
11 | |
); |
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
#! /usr/bin/bash | |
NAME=$1 | |
TYPE=$2 | |
echo "Creating the repository" | |
gh re --browser false --new "$NAME" --type "$TYPE" | |
mkdir "$NAME" | |
cd "$NAME" |
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
#! /usr/bin/bash | |
NAME=$1 | |
TYPE=$2 | |
echo "Creating the repository" | |
gh re --browser false --new "$NAME" --type "$TYPE" | |
mkdir "$NAME" | |
cd "$NAME" |
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
#! /bin/bash | |
CONTAINER=$1 | |
SEARCH=$2 | |
REPLACE=$3 | |
# Dump the file | |
DUMP=$(docker exec $CONTAINER wp db export --add-drop-table --porcelain) |
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
version: '3.2' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: on-failure | |
environment: | |
# Grab this data from wp-config.php | |
# TODO: Update DB_HOST in wp-config.php to "db:port" |
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
pipeline { | |
agent any | |
// Pull the repo first. | |
stages { | |
stage( 'Checkout Repo' ) { | |
steps { | |
checkout scm | |
} | |
} | |
stage( 'Deploy' ) { |