; ########### Common ################## xdebug.start_with_request=trigger xdebug.profiler_enable=0 memory_limit = 1024M xdebug.max_nesting_level = 1024
; ########### Xdebug v2 ################## ;xdebug.remote_enable=1 ;xdebug.remote_port=9003
<?php | |
/** | |
* Hide or display add to cart button based on opening hours. | |
*/ | |
function prefix_woocommerce_is_purchasable( $is_purchasable, $product ) { | |
// Get the store id. | |
$store_id = get_post_field( 'post_author', $product->get_id() ); | |
// Get the store info. |
<?php | |
/** | |
* Split orders when order containing products from multiple vendor is created from admin dashboard. | |
*/ | |
function sagar_order_creation_fix( $post_id, $post, $update ) { | |
// Bail early if not admin. | |
if( ! is_admin() ) { | |
return; | |
} |
; ########### Common ################## xdebug.start_with_request=trigger xdebug.profiler_enable=0 memory_limit = 1024M xdebug.max_nesting_level = 1024
; ########### Xdebug v2 ################## ;xdebug.remote_enable=1 ;xdebug.remote_port=9003
For WordPress sites using Custom Post Types, Taxonomy admin listings show cumulative term-assignment totals for all post_types instead of counts specific to the selected post_type. Since Taxonomy listings are always attached to a single post_type, totals for shared taxonomies don't make sense.
Fix term counts so wp-admin Taxonomy listings show the correct number of items for the selected post_type.
##################### | |
# | |
# Use this with or without the .gitattributes snippet with this Gist | |
# create a fixle.sh file, paste this in and run it. | |
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
# This Gist normalizes handling by forcing everything to use Unix style. | |
##################### | |
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
#!/bin/bash | |
# Welcome to the WP Core Development Wizard. | |
# | |
# Author: Mehul Gohil | |
# Email: hello@mehulgohil.com | |
# Supports: Local 5.2.8. or later | |
# | |
# PreRequisites: | |
# 1. Install wget, subversion, curl, php5-cli, and git |
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: true | |
tasks: | |
- name: Add APT repositories | |
when: ansible_os_family == 'Debian' | |
become: true | |
block: |