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
# Continuous Integration to a WP Engine install | |
# PHP CircleCI 2.0 configuration file | |
# | |
# You need to generate and add SSH key to CircleCI project SSH Permissions tab | |
# And then copy fingerprint and replace YOUR_SSH_KEY with it. Also same Key must be added to WPEngine's project SSH tab. | |
# After, You need to add environtmen varriables WP_THEME_DIR - theme directory and WPE_INSTALL - | |
# WPEngine install name/slug. You need to have .gitignores folder with two files (__default and __production) | |
# __default means that it will be used in local develoment, and __production will be used when pushing to WPEngine | |
version: 2 |
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
add_filter( 'woocommerce_package_rates', 'hide_standard_shipping_in_state' , 10, 2 ); | |
/** | |
* Hide free shipping if shipping state is AK, AL, AR, HI, MA, MS, PA, or UT | |
* | |
* @param array $available_methods | |
*/ | |
function hide_standard_shipping_in_state( $rates, $package ) { | |
$excluded_states = array( 'AK','AL','AR','HI','MA','MS','PA','UT' ); |
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
/** | |
* This code should be added to functions.php of your theme | |
**/ | |
add_filter('woocommerce_empty_price_html', 'custom_call_for_price'); | |
function custom_call_for_price() { | |
return 'Call for price'; | |
} |
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
/////////////////////////////////////////////////////////////////////////////////////////// | |
// CODE TO ADD POST PER PAGE FILTER | |
/////////////////////////////////////////////////////////////////////////////////////////// | |
add_filter( 'edit_posts_per_page', 'reorder_edit_posts_per_page', 10, 2 ); | |
function reorder_edit_posts_per_page( $per_page, $post_type ) { | |
// CHECK USER PERMISSIONS | |
if ( !current_user_can('edit_others_pages') ) | |
return; | |
$post_type_object = get_post_type_object( $post_type ); |