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 custom_tracking_code() { | |
| if ( is_product() ) { | |
| ?> Add your Product code here <?php | |
| } elseif ( is_cart() ) { | |
| ?> Add your Cart code here <?php | |
| } elseif ( is_order_received_page() ) { | |
| ?> Add your Thank you code here <?php | |
| } | |
| } | |
| add_action( 'wp_head', 'custom_tracking_code' ); |
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
| /** | |
| * wc_shipment_tracking_add_custom_provider | |
| * | |
| * Adds custom provider to shipment tracking or add existing providers to another country. | |
| * | |
| * Change the country name, the provider name, and the URL (it must include the %1$s) | |
| * Add one provider per line | |
| */ | |
| add_filter( 'wc_shipment_tracking_get_providers' , 'wc_shipment_tracking_add_custom_provider' ); |
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( 'wc_session_expiring', create_function( '', 'return 10;' ) ); | |
| add_filter( 'wc_session_expiration', create_function( '', 'return 15;' ) ); |
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( 'wc_photography_shop_loop_image_html', 'wc_photography_loop_image_link' ); | |
| function wc_photography_loop_image_link( $html ) { | |
| global $product; | |
| return preg_replace( '/href="([^"]*)"/', sprintf( 'href="%s"', get_permalink( $product->id ) ), $html ); | |
| } |
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_reports_get_order_report_query', 'wc_custom_limit_query' ); | |
| function wc_custom_limit_query( $query ) { | |
| global $wpdb; | |
| $wpdb->query( "SET OPTION SQL_BIG_SELECTS=1" ); | |
| return $query; | |
| } |
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
| // Check the name of your addon field in the source. Example: addon-7934-test-addon | |
| jQuery( 'input[name="addon-90-adventure-dates[check-in]"]' ).datepicker( { | |
| minDate: 0, | |
| "dateFormat": 'yy-mm-dd' | |
| } ); |
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
| // Check the name of your addon field in the source. Example: addon-7934-test-addon | |
| jQuery( "input[name='addon-90-adventure-dates']" ).datepicker( { | |
| minDate: 0, | |
| "dateFormat": 'yy-mm-dd' | |
| } ); |
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
| // Check the name of your addon field in the source. Example: addon-7934-test-addon | |
| jQuery( 'input[name="addon-90-adventure-dates[check-in]"]' ).datepicker( { | |
| minDate: 0, | |
| "dateFormat": 'yy-mm-dd' | |
| } ); |
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 jeherve_delete_jetpack_menu() { | |
| if ( ! current_user_can( 'manage_options' ) ) { | |
| remove_menu_page( 'jetpack' ); | |
| } | |
| } | |
| add_action ( 'admin_menu', 'jeherve_delete_jetpack_menu', 999 ); |
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_countries_base_postcode', create_function( '', 'return "80903";' ) ); | |
| add_filter( 'woocommerce_countries_base_city', create_function( '', 'return "COLORADO SPRINGS";' ) ); |