Skip to content

Instantly share code, notes, and snippets.

@nerrad
nerrad / evaluate-php-load-time.md
Created July 19, 2019 20:11
Evaluating WordPress load time via command line

The commands on this page are useful for measuring php response times etc for your WordPress installation via commandline. This gives useful info to help debug issues at the php level separate from the http routes.

I'm pretty sure I didn't come up with this, but I have shared it in a few different places so just adding it to my personal gist repo for reference.

Create the base script

Create a script (name it whatever you want, something like t.php should suffice) in the root directory of your wp install (i.e. the same directory as the wp-config.php and main index.php file for WP. You can substitue whatever you want in the $_SERVER['REQUEST_URI'] to test different pages if you want.

php
@nerrad
nerrad / README.md
Created April 23, 2021 15:31
Modifying existing payment method config in WooCommerce Blocks checkout flow

DISCLAIMER: PLEASE READ

Note, this is just a proof of concept as an example of how this type of functionality could be implemented and should be used only if you understand the code. This uses an experimental interface provided by the WooCommerce Blocks API and it may get removed or changed in the future.

This is use at your own risk. Is not an official solution and not supported.

Ideally this kind of behaviour should be something that is provided by the official payment method extension.

WHAT THIS DOES