Skip to content

Instantly share code, notes, and snippets.

probably sleeping

Muhammad Rizwan mrizwan47

probably sleeping
Block or report user

Report or block mrizwan47

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Dashicons array with glyph code
$dashicons = array(
'&#xf333;' => 'dashicons-menu',
'&#xf319;' => 'dashicons-admin-site',
'&#xf226;' => 'dashicons-dashboard',
'&#xf109;' => 'dashicons-admin-post',
'&#xf104;' => 'dashicons-admin-media',
'&#xf103;' => 'dashicons-admin-links',
'&#xf105;' => 'dashicons-admin-page',
'&#xf101;' => 'dashicons-admin-comments',
mrizwan47 / wc_change_sales_price.php
Last active Jan 10, 2020
Change woocommerce sales price programmatically
View wc_change_sales_price.php
// Your Product ID
$product_id = 57;
$ecd_product = new WC_Product( $product_id );
* Check if product exists
if( $ecd_product->exists() ){
mrizwan47 / delete-all-woocommerce-products.php
Last active Oct 14, 2016 — forked from mikaelz/delete-all-woocommerce-products.php
Remove all WooCommerce products from database via SQL
View delete-all-woocommerce-products.php
global $wpdb;
$wpdb->query("DELETE FROM $wpdb->terms WHERE term_id IN (SELECT term_id FROM $wpdb->term_taxonomy WHERE taxonomy LIKE 'pa_%')");
$wpdb->query("DELETE FROM $wpdb->term_taxonomy WHERE taxonomy LIKE 'pa_%'");
$wpdb->query("DELETE FROM $wpdb->term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM $wpdb->term_taxonomy)");
$wpdb->query("DELETE FROM $wpdb->term_relationships WHERE object_id IN (SELECT ID FROM $wpdb->posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id IN (SELECT ID FROM $wpdb->posts WHERE post_type IN ('product','product_variation'))");
$wpdb->query("DELETE FROM $wpdb->posts WHERE post_type IN ('product','product_variation')");
$wpdb->query("DELETE pm FROM $wpdb->postmeta pm LEFT JOIN $wpdb->posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL");
mrizwan47 / php-html-css-js-minifier.php
Last active Aug 19, 2016 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
View php-html-css-js-minifier.php
* ----------------------------------------------------------------------------------------
* Based on ``
* ----------------------------------------------------------------------------------------
You can’t perform that action at this time.