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
/** | |
* Reorder product data tabs | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 ); | |
function woo_reorder_tabs( $tabs ) { | |
$tabs['reviews']['priority'] = 5; // Reviews first | |
$tabs['description']['priority'] = 10; // Description second | |
$tabs['additional_information']['priority'] = 15; // Additional information third |
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
/** | |
* Rename product data tabs | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 ); | |
function woo_rename_tabs( $tabs ) { | |
$tabs['description']['title'] = __( 'More Information' ); // Rename the description tab | |
$tabs['reviews']['title'] = __( 'Ratings' ); // Rename the reviews tab | |
$tabs['additional_information']['title'] = __( 'Product Data' ); // Rename the additional information tab |
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 product data tabs | |
*/ | |
add_filter( 'woocommerce_product_tabs', 'woo_remove_product_tabs', 98 ); | |
function woo_remove_product_tabs( $tabs ) { | |
unset( $tabs['description'] ); // Remove the description tab | |
unset( $tabs['reviews'] ); // Remove the reviews tab | |
unset( $tabs['additional_information'] ); // Remove the additional information tab |
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 Filter Orders By Custom Field | |
* Plugin URI: https://gist.github.com/imuhammadshoaib/48fccfde3a11816f80151ec94bf2c08e | |
* Description: Adds a filter to the Edit Orders admin page to show orders by the custom field - billing area. | |
* Version: 1.0.1 | |
* Author: Muhammad Shoaib | |
* Author URI: https://github.com/imuhammadshoaib/ | |
* Text Domain: ww-filter-orders | |
*/ |
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
public function debug_log_content($msg,$filename) { | |
try { | |
$uploads = wp_upload_dir( null, false ); | |
$logs_dir = $uploads['basedir'] . '/mnp-logs'; | |
if ( ! is_dir( $logs_dir ) ) { | |
mkdir( $logs_dir, 0755, true ); | |
} |
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
function myprefix_custom_cron_schedule( $schedules ) { | |
$schedules['every_six_hours'] = array( | |
'interval' => 21600, // Every 6 hours | |
'display' => __( 'Every 6 hours' ), | |
); | |
return $schedules; | |
} | |
add_filter( 'cron_schedules', 'myprefix_custom_cron_schedule' ); | |
//Schedule an action if it's not already scheduled |
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
body { | |
padding-top: 55px; | |
} | |
/* mobile navbar sidebar under lg breakpoint */ | |
@media (max-width: 992px) { | |
.navbar-collapse.collapsing .navbar-nav { | |
display: block; | |
position: fixed; |
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
@supports (-ms-ime-align: auto) { | |
.selector { | |
color: red; | |
} | |
} |
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
$(":input:not(:hidden)").each(function (i) { | |
$(this).attr('tabindex', i + 1); | |
}); |
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
$(":input:not(:hidden)").each(function (i) { | |
$(this).attr('tabindex', i + 1); | |
}); |