This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ) { |