Skip to content

Instantly share code, notes, and snippets.

View ventouris's full-sized avatar

Tasos Ventouris ventouris

  • Greece
View GitHub Profile
-- Remove all attributes from WooCommerce
DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%');
DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%';
DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy);
-- Delete all WooCommerce products
DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));
DELETE FROM wp_posts WHERE post_type IN ('product','product_variation');
-- Delete orphaned postmeta
DELETE pm
{
"contributors": null,
"coordinates": null,
"created_at": "Tue May 21 05:59:29 +0000 2019",
"display_text_range": [
0,
140
],
"entities": {
"hashtags": [],
function tracking_company_select_options() {
return array(
'elta' => 'Ελτά',
'tnt' => 'TNT',
'geniki_taxydromiki' => 'Γενική Ταχυδρομική'
);
}
add_action( 'cmb2_admin_init', 'dcwd_order_metabox' );
function dcwd_order_metabox() {
/*
* Adjust the interval that the feed file is generated.
*/
function sv_wc_facebook_feed_generation_interval( $interval ) {
// return the time in seconds that the interval should run e.g. 180 minutes:
return 60 * 180;
}
add_filter( 'wc_facebook_feed_generation_interval', 'sv_wc_facebook_feed_generation_interval', 10, 1 );
@ventouris
ventouris / json
Created January 13, 2022 14:31
Data Scientist skills
{
"success": true,
"message": "",
"result": {
"id": 3413,
"name": "data scientist",
"description": "People in this job find and interpret rich data sources, manage large amounts of data, merge data sources, ensure consistency of data-sets, and create visualisations to aid in understanding data. They build mathematical models using data, present and communicate data insights and findings to specialists and scientists in their team and if required, to a non-expert audience, and recommend ways to apply the data. They utilise recommendation engines, spam classifiers, sentiment analysers and classifiers for unstructured and semi-structured data.",
"status": "active",
"type": "platform",
"attributes": [],