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 // In functions.php: | |
/* -- Year and month based archive listings -- */ | |
function posts_by_year() { | |
// array to use for results | |
$years = array(); | |
// get posts from WP | |
$posts = get_posts(array( | |
'numberposts' => -1, | |
'orderby' => 'post_date', |
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 | |
// ... | |
function woo_payment_gateway() { | |
class Woo_PayPal_Gateway extends WC_Payment_Gateway { | |
} | |
} |
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 | |
/* | |
Plugin Name: Custom Payment Gateway | |
Description: Custom payment gateway example | |
Author: Lafif Astahdziq | |
Author URI: https://lafif.me | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly |
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
# create a local .env file with the following 4 properties: | |
# | |
# MYSQL_DATABASE=<something> | |
# MYSQL_USER=<something> | |
# MYSQL_PASSWORD=<something> | |
# MYSQL_ROOT_PASSWORD=<something> | |
# | |
# Note: I have had a LOT of issues working with anything newer then Docker Desktop v4.26.1 | |
# If you're on something newer, then double check against this release. | |
# |