Skip to content

Instantly share code, notes, and snippets.

View RiFi2k's full-sized avatar

Reilly Lowery RiFi2k

View GitHub Profile
if ( class_exists( 'woocommerce' ) ) {
if ( is_wc_endpoint_url( 'order-pay' ) ) {
global $wp;
$order_id = $wp->query_vars['order-pay'];
$order_author_id = get_post_field( 'post_author', $order_id );
$current_user_id = get_current_user_id();
if ( $order_author_id !== $current_user_id ) {
// Do something here when user did not place the order.
// Redirect to homepage etc.
}
#!/bin/bash
#
# TMBI Kubernetes E2E Test
#
# Author: Reilly Lowery <https://github.com/rifi2k>
# Copyright: 45AIR
# Permission to copy and modify is granted under the MIT license
#===============================================================================
set -eo pipefail