Skip to content

Instantly share code, notes, and snippets.

View darrenmcentee's full-sized avatar

darrenmcentee

View GitHub Profile
@yiedpozi
yiedpozi / functions.php
Created June 3, 2021 07:30
Display total stock and total variations in WooCommerce products management page
<?php
add_filter( 'manage_edit-product_columns', 'woocommerce_product_custom_columns' );
function woocommerce_product_custom_columns( $columns ) {
$new_columns = array();
foreach ( $columns as $key => $value ) {
$new_columns[ $key ] = $value;
// Add total variations column after stock status column
@vsoch
vsoch / index.php
Last active June 2, 2024 14:28
Generate RSS feed for files in a directory folder. Put this file in a folder with files, modify the $allowed_ext variable to customize your extensions, and $feedName, $feedDesc, $feedURL, and $feedBaseURL. Then navigate to the folder on the web to see the xml feed. Done!
<?php
header('Content-type: text/xml');
/*
Runs from a directory containing files to provide an
RSS 2.0 feed that contains the list and modification times for all the
files.
*/
$feedName = "My Audio Feed";
$feedDesc = "Feed for the my audio files in some server folder";