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
// --------------------- | |
// 1. Register Order Status | |
add_filter( 'woocommerce_register_shop_order_post_statuses', 'extended_register_custom_order_status' ); | |
function extended_register_custom_order_status( $order_statuses ){ | |
// Status must start with "wc-" | |
$order_statuses['wc-custom-status'] = array( | |
'label' => _x( 'Custom Status', 'Order status', 'woocommerce' ), |
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: wpdevguides.com must use plugins | |
Description: code that is used always | |
Version: 1.0.0 | |
Author: WP Developer Guides | |
Author URI: wpdevguides.com | |
*/ | |
add_filter( 'wc_stripe_payment_request_total_label_suffix', '__return_null' ); |
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 | |
//Remove the <?php while using it in your theme's functions.php file | |
//Add store open-show information before single product add-to-cart button | |
add_action('woocommerce_before_add_to_cart_form', 'dokan_open_close', 1000); | |
function dokan_open_close() { | |
global $product; |
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 | |
// Remove "Become a vendor" button from customers account | |
if(class_exists('Dokan_Pro')) { | |
remove_action( 'woocommerce_after_my_account', array( Dokan_Pro::init(), 'dokan_account_migration_button' ) ); | |
} |
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 | |
//Remove resources tab under Vendor Dashboard > Booking menu | |
add_filter('dokan_booking_nav_titles', function ($bookings) { | |
unset($bookings['resources']); | |
return $bookings; | |
}); |
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 | |
/** | |
* Single Product Rating | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/rating.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 or modify States | |
*/ | |
add_filter( 'woocommerce_states', 'custom_woocommerce_states' ); | |
function custom_woocommerce_states( $states ) { | |
$states['DK'] = array( | |
'DK1' => 'Aarø', | |
); |
OlderNewer