Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
@dexit
dexit / woocommerce-add-new-tab-my-account-page.php
Created December 16, 2024 16:19 — forked from sandeshjangam/woocommerce-add-new-tab-my-account-page.php
WooCommerce - Add New “Tab” at My Account Page
<?php
/**
* @snippet WooCommerce How To Add New Tab @ My Account
* @how-to Watch tutorial @ https://techiesandesh.com
* @author Sandesh Jangam
* @compatible WooCommerce 3.6.2
* @donate $7 https://www.paypal.me/SandeshJangam/7
*/
/**
@dexit
dexit / functions.php
Created December 16, 2024 16:19 — forked from geeac/functions.php
custom endpoint My Account
// create a custom end point in the My Accunt Page
function custom_wc_end_point() {
if(class_exists('WooCommerce')){
add_rewrite_endpoint( 'wholesale-ordering', EP_ROOT | EP_PAGES );
}
}
add_action( 'init', 'custom_wc_end_point' );
function custom_endpoint_query_vars( $vars ) {
$vars[] = 'wholesale-ordering';
return $vars;
@dexit
dexit / woo-endpoint-custom.php
Created December 16, 2024 16:18 — forked from neilgee/woo-endpoint-custom.php
WooCommerce Endpoint Order and Rename - My Account Page v2.6+
<?php
/*
Plugin Name: WooCustom My Account
Plugin URI: http://wpbeaches.com/
Description: WooCustom - add a custom area in my-account
Author: Neil Gee
Version: 1.0.0
Author URI: http://wpbeaches.com
License: GPL-2.0+
@dexit
dexit / myaccount-tab.php
Created December 16, 2024 16:14 — forked from v2webnarendra13/myaccount-tab.php
Custom My Account Additional Tab Woocommerce
<?php
/**
*Plugin Name: Myaccount Additional Tab
*Plugin URI: coming soon
*Description: Just another myaccount plugin. Simple but flexible.
*Author: Narendra Singh
*Author URI: https://roimantra.com/
*Text Domain: MyAccount Tab
*Domain Path: /languages/
@dexit
dexit / edit-thank-you-page.php
Created December 16, 2024 16:12 — forked from Anshu-wwc/edit-thank-you-page.php
Edit Thank you page text : woocommerce
<?php
// Thank you page text
add_filter('woocommerce_thankyou_order_received_text', 'woo_change_order_received_text', 10, 2 );
function woo_change_order_received_text( $str, $order ) {
// Text to change
$new_str = 'Thank you for buying, Order received successfully.<br />';
$new_str .= 'To Access your dashboard click here <a class="elementor-button-link elementor-button elementor-size-sm" role="button" href="/dashboard">
<span class="elementor-button-content-wrapper">
<span class="elementor-button-text">My Dashboard</span></span></a>';
@dexit
dexit / functions.php
Created December 16, 2024 10:05
Elementor Hello Child Theme
<?php
/**
* Theme functions and definitions
*
* @package HelloElementorChild
*/
/**
* Load child theme css and optional scripts
*
@dexit
dexit / renamewpjm.php
Created December 4, 2024 21:42 — forked from utsavsinghrathour/renamewpjm.php
Rename WP Job Manager String
Rename WP Job Manager StringsRename WP Job Manager Strings
@dexit
dexit / functions.php
Created December 3, 2024 16:19 — forked from kraftbj/functions.php
Add editor role to WPJM
<?php
/*
Plugin Name: Add Editor to WPJM Management
Plugin URI: http://wpjobmanager.com
Description: Custom plugin to add the editor to WPJM.
Version: 0.1
Author: Brandon Kraft
Author URI: https://kraft.im/
*/
@dexit
dexit / script.js
Created December 3, 2024 16:18 — forked from rosemulazada/script.js
SCALABLE: Save form data to localStorage and auto-complete on refresh
// With the help of Jeremy Keith, I was able to create a fully scalable code sample that you can copy-paste into your project.
// It will save the user input value on blur, this includes radio buttons, checkboxes and date inputs besides regular text/number inputs.
// The only condition is that you give the form element on your page a data-attribute of data-form-topic="foo".
// This code snippet saves the data-attribute as the key to the localStorage, and the value of it will be an object with key/value pairs of the respective inputs name and value.
// Please refer to this gist somewhere in your code if you use it :)
// Happy coding!
// VARIABLE DECLARATIONS
// objects
let savedData = {};
function chapel_project_metaboxes(array $meta_boxes)
{
// underscore hides meta box from custom field list
$prefix = '_chapel_';
$meta_boxes ['project_metabox'] = array(
'id' => 'project_metabox',
'title' => __('Project Overview', 'cmb2'),
'object_types' => array( 'project'),