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 woocommerce_button_proceed_to_checkout(){ | |
| ?> | |
| <a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" class="checkout-button button alt wc-forward"> | |
| <?php esc_html_e( 'Proceed to Make Payment', 'woocommerce' ); ?> | |
| </a> | |
| <?php | |
| } |
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 wc_purchasable_or_not( $product_id, $status = true ) { | |
| // key : ID of Product where you want to hide Add to Cart. | |
| // value : Array of Product IDs which are present in the cart then hide Add to Cart button for Product ID set in key | |
| $product_check = array( | |
| '2701' => array( '2848', '2563', '1253' ), | |
| '2245' => array( '2848', '2563', '1253' ), |
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 orddd_change_pickup_date_label_callback(){ | |
| return __( 'New Pickup Date Label', 'order-pickup-date' ); | |
| } | |
| add_filter( 'orddd_change_pickup_date_label', 'orddd_change_pickup_date_label_callback' ); | |
| function orddd_change_pickup_time_label_callback(){ | |
| return __( 'New Pickup Time Slot Label', 'order-pickup-date' ); |
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 | |
| /** | |
| * Change Date Comparison for Advance Booking Period. | |
| * Using this filter you can prepare date based on to time of the booking. | |
| * | |
| * @param string $time Date and Time String | |
| * @param string $date Date | |
| * @param string $from From Time | |
| * @param string $to To Time |
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 | |
| /** | |
| * Additonal Information in Google Event Summary | |
| * | |
| * @param string $summary Inforation of the Google Event Summary. | |
| * @param obj $data Prepared App data for Gcal Calculation. | |
| */ | |
| function bkap_google_event_summary_callback( $summary, $data ){ |
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
| /** | |
| * Exclude products from a particular category on the shop page | |
| */ | |
| function ts_pre_get_posts_query( $q ) { | |
| if ( ! is_user_logged_in() ) { // Hide below mentioned categories for guest user | |
| $tax_query = (array) $q->get( 'tax_query' ); | |
| $tax_query[] = array( | |
| 'taxonomy' => 'product_cat', |
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 | |
| /** | |
| * Show products only of selected category. | |
| */ | |
| function get_subcategory_terms( $terms, $taxonomies, $args ) { | |
| $new_terms = array(); | |
| $hide_category = array(); |
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 | |
| /** | |
| * Show products only of selected category. | |
| */ | |
| function get_subcategory_terms( $terms, $taxonomies, $args ) { | |
| $new_terms = array(); | |
| $hide_category = array( 126 ); // Ids of the category you don't want to display on the shop page | |
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 | |
| /** | |
| * Automatically adding the product to the cart. | |
| */ | |
| function aaptc_add_product_to_cart( $item_key, $product_id ) { | |
| $product_category_id = array( 16, 17, 18 ); // Category ids of A, B and C | |
| $product_cats_ids = wc_get_product_term_ids( $product_id, 'product_cat' ); | |
| $product_category_id_check = false; |
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 hpcs_hide_products_category_shop( $query ) { | |
| $tax_query = (array) $query->get( 'tax_query' ); | |
| $tax_query[] = array( | |
| 'taxonomy' => 'product_cat', | |
| 'field' => 'slug', | |
| 'terms' => array( 'chairs' ), // Category slug here |