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 or modify States | |
*/ | |
add_filter( 'woocommerce_states', 'custom_woocommerce_states' ); | |
function custom_woocommerce_states( $states ) { | |
$states['DK'] = array( | |
'DK1' => 'Aarø', | |
); |
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 | |
/* | |
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 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 | |
/** | |
* 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 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
// --------------------- | |
// 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 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 | |
/** | |
* Simple product add to cart | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/add-to-cart/simple.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 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 | |
global $woocommerce, $wpdb; | |
$order_id = isset( $_GET['order_id'] ) ? intval( $_GET['order_id'] ) : 0; | |
if ( !dokan_is_seller_has_order( dokan_get_current_user_id(), $order_id ) ) { | |
echo '<div class="dokan-alert dokan-alert-danger">' . esc_html__( 'This is not yours, I swear!', 'dokan-lite' ) . '</div>'; | |
return; | |
} |
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 | |
namespace WeDevs\DokanPro\REST; | |
use WP_REST_Server; | |
use WeDevs\Dokan\Abstracts\DokanRESTAdminController; | |
class LogsController extends DokanRESTAdminController { | |
/** |
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 | |
/** | |
* The Template for displaying all single posts. | |
* | |
* @package dokan | |
* @package dokan - 2014 1.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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_action('dokan_order_content_inside_before', function() { | |
$seller_id = dokan_get_current_user_id(); | |
var_dump($seller_id); | |
global $wp; | |
$current_url = home_url(); | |
$store_settings_page = $current_url . "/dashboard/settings/store"; |
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 | |
//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; |
NewerOlder