
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 row numbers to order items in admin edit order page | |
*/ | |
function ywp_better_admin_order_editing_items() { | |
$current_screen = get_current_screen(); | |
if ( empty( $current_screen ) || ! property_exists( $current_screen, 'id' ) ) { | |
return; | |
} |
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 | |
function ywp_fix_woocommerce_admin_order_list_css() { | |
$custom_css = " | |
@media screen and (max-width: 782px) { | |
.post-type-shop_order .wp-list-table tr:not(.is-expanded) td.column-order_number a.order-view, .woocommerce_page_wc-orders .wc-orders-list-table.wp-list-table tr:not(.is-expanded) td.column-order_number a.order-view { | |
width: calc(100% - 48px - 10ch)!important; | |
} | |
} | |
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 | |
/** | |
* Clearing the browser cache for all users who have visited your site can be challenging | |
* since you can’t directly control their browsers. | |
* However, you can take some steps to ensure that the updated URL is served to everyone | |
*/ | |
/** | |
* Force refresh users browser cache for specefic Yoast deleted product redirect |
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 | |
/** | |
* When you have a lot of values in an attribute and some of them have similar names, | |
* choosing the right value in the attribute field in the product information box is a pain and there is a high chance of mistakes. | |
* One solution is to consider a different slug for each attribute. | |
* But the problem is that when searching for values in attributes, | |
* only the attribute name is displayed to you. | |
* The code that follows helps you choose the right values by displaying the slug of each value (after its name). | |
*/ |
OlderNewer