Notify if Stripe is put in Test Mode

add_action(‘update_option_woocommerce_stripe_settings’, function($old_value, $value, $option) { if (!isset($old_value[‘testmode’]) || !isset($value[‘testmode’])) { return; } if ($old_value[‘testmode’] === $value[‘testmode’]) { return; } $optionName = ‘woocommerce_stripe_testmode_log’; $entry = [ ‘time’ => current_time(‘mysql’), ‘uri’ => $_SERVER[‘REQUEST_URI’] ?? ”, ‘hook’ => current_filter(), ‘old’ => $old_value[‘testmode’], ‘new’…Continue reading

hkosnip

// index.php?name=david echo $_GET[‘name’]; // index.php?name=david&surname=adams echo $_GET[‘surname’];Continue reading

Show the products column on the WooCommerce orders list

// legacy – for CPT-based orders add_filter( ‘manage_edit-shop_order_columns’, ‘misha_order_items_column’ ); // for HPOS-based orders add_filter( ‘manage_woocommerce_page_wc-orders_columns’, ‘misha_order_items_column’ ); function misha_order_items_column( $columns ) { // let’s add our column before “Total” $columns = array_slice( $columns, 0, 4, true ) // 4…Continue reading