Skip to content

Instantly share code, notes, and snippets.

View pixelbart's full-sized avatar
👋
Hi

Kevin Pliester pixelbart

👋
Hi
View GitHub Profile
@pixelbart
pixelbart / functions.php
Created July 27, 2023 14:52 — forked from InpsydeNiklas/functions.php
display icon for ppcp-gateway in the checkout
function woocommerce_paypal_payments_gateway_icon( $icon, $id ) {
if ( $id === 'ppcp-gateway' ) {
return '<img src="https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png" alt="PayPal Payments" />';
} else {
return $icon;
}
}
add_filter( 'woocommerce_gateway_icon', 'woocommerce_paypal_payments_gateway_icon', 10, 2 );
@pixelbart
pixelbart / generatePassword.php
Last active February 18, 2020 15:40 — forked from zyphlar/generatePassword.php
Generating secure passwords in PHP
<?php
/**
* Generates random, secure bytes that will be used for the password.
*
* @param int $nbBytes
* @param bool $strong
*
* @return string
*/
function get_random_bytes( $nbBytes = 32, $strong = true ) {