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 | |
/** | |
* woocommerce_single_product_summary hook | |
* | |
* @hooked woocommerce_template_single_title - 5 | |
* @hooked woocommerce_template_single_rating - 10 | |
* @hooked woocommerce_template_single_price - 10 | |
* @hooked woocommerce_template_single_excerpt - 20 | |
* @hooked woocommerce_template_single_add_to_cart - 30 | |
* @hooked woocommerce_template_single_meta - 40 |
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 | |
// Odepnij krótki opis z priorytetem 20 | |
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); | |
// Wepnij krótki opis z priorytetem 6 | |
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 6 ); |
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( 'woocommerce_email', 'wpdesk_disable_backorder_email' ); | |
// Wyłącz powiadomienia mailowe o produkcie na zamówienie | |
function wpdesk_disable_backorder_email( $email_class ) { | |
remove_action( 'woocommerce_product_on_backorder_notification', array( $email_class, 'backorder' ) ); | |
} |
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 | |
// Przywróć dodatkowe stawki w "płaskiej stawce" | |
add_filter( 'woocommerce_enable_deprecated_additional_flat_rates', '__return_true' ); |
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_filter( 'woocommerce_package_rates', 'hide_shipping_when_free_is_available', 10, 2 ); | |
/** | |
* Hide shipping rates when free shipping is available: https://docs.woothemes.com/document/hide-other-shipping-methods-when-free-shipping-is-available/ | |
* | |
* @param array $rates Array of rates found for the package | |
* @param array $package The package array/object being shipped | |
* @return array of modified rates |
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( 'woocommerce_after_order_notes', 'wpdesk_vat_field' ); | |
/** | |
* Pole NIP w zamówieniu | |
*/ | |
function wpdesk_vat_field( $checkout ) { | |
echo '<div id="wpdesk_vat_field"><h2>' . __('Dane do Faktury') . '</h2>'; | |
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 | |
// Do NOT include the opening php tag shown above. Copy the code shown below. | |
add_action( 'woocommerce_checkout_update_order_meta', 'wpdesk_checkout_vat_number_update_order_meta' ); | |
/** | |
* Save VAT Number in the order meta | |
*/ | |
function wpdesk_checkout_vat_number_update_order_meta( $order_id ) { | |
if ( ! empty( $_POST['vat_number'] ) ) { | |
update_post_meta( $order_id, '_vat_number', sanitize_text_field( $_POST['vat_number'] ) ); |
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( 'woocommerce_admin_order_data_after_billing_address', 'wpdesk_vat_number_display_admin_order_meta', 10, 1 ); | |
/** | |
* Wyświetlenie pola NIP | |
*/ | |
function wpdesk_vat_number_display_admin_order_meta( $order ) { | |
echo '<p><strong>' . __( 'NIP', 'woocommerce' ) . ':</strong> ' . get_post_meta( $order->id, '_vat_number', true ) . '</p>'; | |
} |
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('in_admin_footer', 'my_admin_footer_function'); | |
/** | |
* Add HS Beacon | |
* | |
*/ | |
function my_admin_footer_function() { | |
$current_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; |
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( 'in_admin_footer', 'my_admin_footer_function' ); | |
/** | |
* Add HS Beacon | |
* | |
*/ | |
function my_admin_footer_function() { | |
?> |
OlderNewer