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
$coupons = WC()->cart->get_applied_coupons(); | |
if ( $coupons ) { | |
wc_print_notice( 'Coupon ' . implode( ', ', $coupons ) . ' has been applied to your cart.', 'notice' ); | |
} |
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 and display the custom field in product general setting tab | |
add_action( 'woocommerce_product_options_general_product_data', 'add_custom_field_general_product_fields' ); | |
function add_custom_field_general_product_fields(){ | |
global $post; | |
echo '<div class="product_custom_field">'; | |
// Custom Product Checkbox Field | |
woocommerce_wp_checkbox( array( |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |