Skip to content

Instantly share code, notes, and snippets.

View digisavvy's full-sized avatar

Alex Vasquez digisavvy

View GitHub Profile
name: Pantheon Terminus Deploy to Members Branch
# Controls when the action will run.
on:
push:
branches:
- 'members'
jobs:
build:
h1 {
margin: 0 8px 16px;
font-size: 3.625rem;
line-height: 64px;
color: #fff;
letter-spacing: 2px;
font-weight: 900;
-webkit-text-stroke: 2px;
-webkit-text-stroke-color: #000;
text-shadow: -1p
@digisavvy
digisavvy / Pantheon - Use Terminus and WP CLI to update user password.txt
Created January 9, 2021 23:27
Update existing WP user password in Terminus using WP CLI
terminus auth:login --machine-token={your_machine_token}
terminus wp {sitename}.{env} -- user update {userID} --user_pass={enterStrongPassword}
/**
* Add Custom Variable
*/
add_action( 'fue_before_variable_replacements', 'fue_register_variable_replacements', 10, 4);
function fue_register_variable_replacements( $var, $email_data, $fue_email, $queue_item ) {
$variables = array(
'tracking_number' => ''
);
function fue_register_variable_replacements( $var, $email_data, $fue_email, $queue_item ) {
$variables = array(
'tracking_number' => ''
);
if ( isset( $email_data['test'] ) && $email_data['test'] ) {
$tracking = get_post_meta( $order_id, '_wc_acof_2', true );
$variables['tracking_number'] = "$tracking";
@digisavvy
digisavvy / Terminus Order Delete.txt
Created August 9, 2020 06:58
For deleting all woo orders via terminus and wp cli
terminus remote:wp reebokfp.checkout -- post delete $(terminus remote:wp reebokfp.checkout -- post list --post_type=shop_order --format=ids) --force
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
do_action( 'cfw_thank_you_before_main_container', $order ); ?>
<main id="cfw" class="<?php echo cfw_main_container_classes( 'thank-you' ); ?>">
<?php do_action( 'cfw_thank_you_main_container_start', $order ); ?>
@digisavvy
digisavvy / wp-config-local.php
Last active June 13, 2020 16:40
update config
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
@digisavvy
digisavvy / Black Lives Matter
Created June 9, 2020 19:57
Black Lives Matter
<!--
88""Yb 88 db dP""b8 88 dP 88 88 Yb dP 888888 .dP"Y8 8b d8 db 888888 888888 888888 88""Yb
88__dP 88 dPYb dP `" 88odP 88 88 Yb dP 88__ `Ybo." 88b d88 dPYb 88 88 88__ 88__dP
88""Yb 88 .o dP__Yb Yb 88"Yb 88 .o 88 YbdP 88"" o.`Y8b 88YbdP88 dP__Yb 88 88 88"" 88"Yb
88oodP 88ood8 dP""""Yb YboodP 88 Yb 88ood8 88 YP 888888 8bodP' 88 YY 88 dP""""Yb 88 88 888888 88 Yb
-->
@digisavvy
digisavvy / Is current page using Elementor?
Created May 28, 2020 01:00
A simple check if the current page is using ELementor
<?php // Do not include this line.
$post_id = get_the_ID(); // Set post ID var.
if ( Elementor\Plugin::instance()->db->is_built_with_elementor( $post_id ) ) {
echo 'fuck yeah it is!';
}