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
| /** | |
| * @snippet WooCommerce Set Default City @ Checkout | |
| * @how-to Get CustomizeWoo.com FREE | |
| * @sourcecode https://businessbloomer.com/?p=21223 | |
| * @author Rodolfo Melogli | |
| * @testedwith WooCommerce 3.4.6 | |
| */ | |
| add_filter( 'woocommerce_checkout_fields', 'bbloomer_set_checkout_field_input_value_default' ); | |
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
| // To change add to cart text on single product page | |
| add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); | |
| function woocommerce_custom_single_add_to_cart_text() { | |
| return __( 'Buy Now', 'woocommerce' ); | |
| } | |
| // To change add to cart text on product archives(Collection) page | |
| add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_custom_product_add_to_cart_text' ); | |
| function woocommerce_custom_product_add_to_cart_text() { | |
| return __( 'Buy Now', 'woocommerce' ); |
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
| M500 ; reset EEPROM | |
| G28 ; Home | |
| M106 P0 S255 ; Set fan speed to 100% | |
| M303 E0 S200 C8 U1 ; PID autotune extruder | |
| M106 P0 S0 ; Turn off fan | |
| M303 E-1 S50 C8 U1 ; PID autotune bed | |
| M851 Z-1.0 ; Set z-offset | |
| M503 ; Print current settings | |
| M500 ; Save 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
| # Habilitar o PHP 7.1 | |
| <IfModule mime_module> | |
| AddHandler application/x-httpd-ea-php71 .php .php7 .phtml | |
| </IfModule> |
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
| //Sort products without stock WooCommerce | |
| class iWC_Orderby_Stock_Status | |
| { | |
| public function __construct() | |
| { | |
| // Check if WooCommerce is active | |
| if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) { | |
| add_filter('posts_clauses', array($this, 'order_by_stock_status'), 2000); | |
| } | |
| } |
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 | |
| remove_filter( 'woocommerce_cart_shipping_packages', 'dokan_custom_split_shipping_packages' ); | |
| remove_filter( 'woocommerce_shipping_package_name', 'dokan_change_shipping_pack_name' ); | |
| remove_action( 'woocommerce_checkout_create_order_shipping_item', 'dokan_add_shipping_pack_meta' ); | |
| add_filter( 'woocommerce_shipping_methods', function($methods){ | |
| unset( $methods['dokan_vendor_shipping'] ); | |
| return $methods; | |
| }, 11 ); |
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 | |
| //FROM | |
| //http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/ | |
| //http://webstractions.com/wordpress/remove-recent-comments-inline-styl/ | |
| //http://wpengineer.com/1438/wordpress-header/ | |
| //https://github.com/boldperspective/Whiteboard-Framework | |
| //REMOVE ADMIN BAR | |
| add_filter( 'show_admin_bar', '__return_false' ); |
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
| // Allow editors to edit WordPress menus | |
| $role_object = get_role( 'editor' ); | |
| $role_object->add_cap( 'edit_theme_options' ); | |
| ///// | |
| function hide_menu() { | |
| if (current_user_can('editor')) { | |
| remove_submenu_page( 'themes.php', 'themes.php' ); // hide the theme selection submenu |
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
| // | |
| //Show values and add to cart only for users who have logged in to WooCommerce. | |
| // | |
| add_action( 'init', 'wc_hide_price_add_cart_not_logged_in' ); | |
| function wc_hide_price_add_cart_not_logged_in() { | |
| if ( !is_user_logged_in() ) { | |
| remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); | |
| remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); |
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
| //Remove Personal Options in WordPress Admin Profile Page | |
| //https://isabelcastillo.com/hide-personal-options-wordpress-admin-profile | |
| function remove_personal_options(){ | |
| echo '<script type="text/javascript">jQuery(document).ready(function($) { | |
| $(\'form#your-profile > h2:first\').remove(); // remove the "Personal Options" title | |
| $(\'form#your-profile tr.user-rich-editing-wrap\').remove(); // remove the "Visual Editor" field | |
| $(\'form#your-profile tr.user-admin-color-wrap\').remove(); // remove the "Admin Color Scheme" field | |
| $(\'form#your-profile tr.user-comment-shortcuts-wrap\').remove(); // remove the "Keyboard Shortcuts" field | |
| $(\'form#your-profile tr.user-admin-bar-front-wrap\').remove(); // remove the "Toolbar" field |