This file contains 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( 'job_application_form_fields', 'alter_upload_cv_test' ); | |
function alter_upload_cv_test( $fields ) { | |
$fields['application_attachment']['label'] = 'Custom Label'; | |
$fields['application_attachment']['description'] = 'Custom desc'; | |
return $fields; | |
} |
This file contains 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: CC an Email on Applications | |
* Description: Does what it says on the tin. | |
* Version: 1.0 | |
* Author: Adam Heckler | |
* License: GPL v3 | |
*/ | |
add_filter( 'create_job_application_notification_headers', 'job_applications_cc_email' ); |
This file contains 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: Listify Region Bias | |
*/ | |
function listify_region_bias() { | |
return 'country_code'; | |
} | |
add_filter( 'job_manager_geolocation_region_cctld', 'listify_region_bias' ); |
This file contains 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_action( 'wp_enqueue_scripts', 'rcd_exclude_css_from_shop' ); | |
function rcd_exclude_css_from_shop() { | |
if( is_shop() ) { | |
wp_dequeue_style('woocommerce_frontend_styles'); | |
} | |
} | |
?> |
This file contains 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_action( 'wp' , 'wc_order_tabs' ); | |
function wc_order_tabs() { | |
// Remove tabs | |
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_description_tab', 10 ); | |
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_attributes_tab', 20 ); | |
remove_action( 'woocommerce_product_tabs', 'woocommerce_product_reviews_tab', 30 ); |
This file contains 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_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display'); | |
add_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_upsells', 20); | |
if (!function_exists('woocommerce_output_upsells')) { | |
function woocommerce_output_upsells() { | |
woocommerce_upsell_display(3,3); // Display 3 products in rows of 3 | |
} | |
} |
This file contains 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 | |
/** | |
* This code should be added to functions.php of your theme | |
**/ | |
add_filter( 'pre_get_posts', 'custom_pre_get_posts_query' ); | |
function custom_pre_get_posts_query( $q ) { | |
if ( ! $q->is_main_query() ) return; | |
if ( ! $q->is_post_type_archive() ) return; |
This file contains 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
// Simple products | |
add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 ); | |
function jk_woocommerce_quantity_input_args( $args, $product ) { | |
if ( is_singular( 'product' ) ) { | |
$args['input_value'] = 2; // Starting value (we only want to affect product pages, not cart) | |
} | |
$args['max_value'] = 80; // Maximum value | |
$args['min_value'] = 2; // Minimum value | |
$args['step'] = 2; // Quantity steps |
This file contains 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 if ( ( $apply = get_the_job_application_method() ) && current_user_can( 'employer' ) ) : | |
wp_enqueue_script( 'wp-job-manager-job-application' ); | |
?> | |
<div class="job_application application"> | |
<?php do_action( 'job_application_start', $apply ); ?> | |
<input type="button" class="application_button button" value="<?php _e( 'Apply for job', 'wp-job-manager' ); ?>" /> | |
<div class="application_details"> | |
<?php |
This file contains 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
/** | |
* Display field value on the order edit page | |
*/ | |
add_action( 'woocommerce_admin_order_data_after_billing_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 ); | |
function my_custom_checkout_field_display_admin_order_meta($order){ | |
echo '<p><strong>'.__('My Field').':</strong> ' . get_post_meta( $order->id, 'My Field', true ) . '</p>'; | |
} |
OlderNewer