Skip to content

Instantly share code, notes, and snippets.

View bstonedev's full-sized avatar

Brett Stone bstonedev

View GitHub Profile
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
alias wp="php wp-cli.phar"
@bstonedev
bstonedev / advanced-wc-order-debug.php
Created May 31, 2023 22:15
advanced-wc-order-debug.php
<?php
add_action('updated_post_meta','shop_order_meta_updated', 10, 4);
function shop_order_meta_updated($meta_id, $post_id, $meta_key, $meta_value) {
$type = get_post_type( $post_id );
if ($type == 'shop_order') {
error_log("shop_order_meta_updated");
error_log("shop_order ID:" . $post_id);
error_log("meta_key:" . print_r($meta_key, true) );
error_log("meta_value:" . print_r($meta_value, true) );
error_log(wp_debug_backtrace_summary());
@bstonedev
bstonedev / moi-product-content.liquid
Created August 14, 2023 05:58
Product Page code - The Best of MOI
<div class="single-product-banner__content">
<div class="sigle-product__review">
<div class="yotpo bottomLine"
data-product-id="{{ product.id }}">
</div>
<a class="reviews-wrap__link" href="#single-product__reviews-wrap"></a>
{% comment %}
@bstonedev
bstonedev / top-command.txt
Created August 21, 2024 00:11
Top Command Keyboard Commands
top
T x 2
(Shift + E) x 2