This file contains hidden or 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_posts | |
| SET post_status="publish" | |
| WHERE post_type="shop_coupon" |
This file contains hidden or 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 | |
| foreach ( $package['contents'] as $item_id => $values ) { | |
| // skip products that dont need shipping | |
| if ( $values['data']->needs_shipping() ) { | |
| // make sure a weight is set | |
| if ( $values['data']->get_weight() ) { | |
| $item_weight = $values['data']->get_weight(); | |
| // do something with the weight here | |
| // ... |
This file contains hidden or 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: Doge Home Page | |
| * Plugin URI: https://gist.github.com/BFTrick/e73cfa53cf64182d02ae | |
| * Description: Dogeify the front page of your site | |
| * Author: Patrick Rauland | |
| * Author URI: http://patrickrauland.com/ | |
| * Version: 1.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
This file contains hidden or 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 Disable Table Rate Shipping when UPS Rates are Present | |
| * Plugin URI: https://gist.github.com/BFTrick/ab2841ca0daaca413379/ | |
| * Description: A simple plugin that disables the Table Rate Shipping methods when UPS rates are available. | |
| * Author: Patrick Rauland | |
| * Author URI: http://patrickrauland.com/ | |
| * Version: 1.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
This file contains hidden or 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 Disable Freight when UPS Rates are Present | |
| * Plugin URI: https://gist.github.com/BFTrick/34e8b82d068ac7e15886 | |
| * Description: A simple plugin that disables the freight Table Rate Shipping methods when UPS rates are available. It leaves the Local Delivery TRS methods. | |
| * Author: Patrick Rauland | |
| * Author URI: http://patrickrauland.com/ | |
| * Version: 1.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
This file contains hidden or 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
| SELECT * | |
| FROM `wp_usermeta` | |
| WHERE `meta_key` LIKE 'meta-box%' |
This file contains hidden or 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
| DELETE | |
| FROM `wp_usermeta` | |
| WHERE `meta_key` = 'meta-box-order_product' |
This file contains hidden or 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 | |
| class WC_Settings_Tab_Demo { | |
| public static function init() { | |
| add_filter( 'woocommerce_settings_tabs_array', __CLASS__ . '::add_settings_tab', 50 ); | |
| } | |
| public static function add_settings_tab( $settings_tabs ) { | |
| $settings_tabs['settings_tab_demo'] = __( 'Settings Demo Tab', 'woocommerce-settings-tab-demo' ); | |
| return $settings_tabs; |
This file contains hidden or 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_action( 'woocommerce_update_options_settings_tab_demo', 'update_settings' ); | |
| function update_settings() { | |
| woocommerce_update_options( get_settings() ); | |
| } |
This file contains hidden or 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 Format Decimal Tester | |
| * Plugin URI: https://gist.github.com/BFTrick/02653b97fc3351fc3606 | |
| * Description: Test the wc_format_decimal() function. | |
| * Author: Patrick Rauland | |
| * Author URI: http://speakinginbytes.com/ | |
| * Version: 1.0 | |
| * | |
| * This program is free software: you can redistribute it and/or modify |
OlderNewer