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: WooCommerce Attribute Links | |
Description: Display product attribute archive links on product page, right below the add to cart button. | |
Version: 1.0 | |
Author: Coen Jacobs | |
Author URI: http://coenjacobs.me | |
*/ |
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 | |
add_filter( 'manage_edit-shop_order_columns', 'woo_order_weight_column' ); | |
function woo_order_weight_column( $columns ) { | |
$columns['total_weight'] = __( 'Weight', 'woocommerce' ); | |
return $columns; | |
} | |
add_action( 'manage_shop_order_posts_custom_column', 'woo_custom_order_weight_column', 2 ); | |
function woo_custom_order_weight_column( $column ) { | |
global $post, $woocommerce, $the_order; |
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
UPDATE `wp_postmeta` | |
SET meta_value='taxable' | |
WHERE meta_key='_tax_status' |
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
if (current_user_can('subscriber')) { | |
function remove_dashboard_widgets() { | |
// remove WooCommerce Dashboard Status | |
remove_meta_box( 'woocommerce_dashboard_status', 'dashboard', 'normal'); | |
} | |
add_action('wp_user_dashboard_setup', 'remove_dashboard_widgets', 20); | |
add_action('wp_dashboard_setup', 'remove_dashboard_widgets', 20); | |
} // if |
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
/** | |
* Adding Custom GTIN Meta Field | |
* Save meta data to DB | |
*/ | |
// add GTIN input field | |
add_action('woocommerce_product_options_inventory_product_data','woocom_simple_product_gtin_field', 10, 1 ); | |
function woocom_simple_product_gtin_field(){ | |
global $woocommerce, $post; | |
$product = new WC_Product(get_the_ID()); | |
echo '<div id="gtin_attr" class="options_group">'; |
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
<!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} --> | |
<p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p> | |
<!-- /wp:paragraph --> | |
<!-- wp:heading {"level":1} --> | |
<h1>This is a heading (H1)</h1> | |
<!-- /wp:heading --> | |
<!-- wp:heading --> | |
<h2>This is a heading (H2)</h2> |