Skip to content

Instantly share code, notes, and snippets.

View Thisura98's full-sized avatar

Thisura Dodangoda Thisura98

  • Colombo, Sri Lanka
  • 23:13 (UTC +05:30)
View GitHub Profile
@saimonh3
saimonh3 / dokan_get_product_attributes_by_order.php
Created November 18, 2019 07:24
Dokan export order attributes
<?php
/**
* Dokan get seller amount from order total
*
* @param int $order_id
*
* @return float
*/
function dokan_get_seller_amount_from_order( $order_id, $get_array = false ) {
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 16, 2025 21:12
crack activate Office on mac with license file
@nayemDevs
nayemDevs / extra-field.php
Last active September 19, 2023 16:10
Add extra field on vendor settings area and show the field value on the store banner
/*Extra field on the seller settings and show the value on the store banner -Dokan*/
// Add extra field in seller settings
add_filter( 'dokan_settings_form_bottom', 'extra_fields', 10, 2);
function extra_fields( $current_user, $profile_info ){
$seller_url= isset( $profile_info['seller_url'] ) ? $profile_info['seller_url'] : '';
?>
<div class="gregcustom dokan-form-group">
@wizioo
wizioo / gitignore_per_git_branch.md
Last active April 24, 2025 04:55
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.