View remove-woocommerce-marketplace-suggestions-tab.php
This file contains 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_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false' ); |
View removing-options-from-the-product-data-panel-in-woocommerce.php
This file contains 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
// Remove options from the Product Data Panel in WooCommerce | |
function remove_product_data_tabs( $tabs ) { | |
//unset( $tabs['general'] ); | |
unset( $tabs['inventory'] ); | |
unset( $tabs['shipping'] ); | |
unset( $tabs['linked_product'] ); | |
//unset( $tabs['attribute'] ); | |
//unset( $tabs['variations'] ); | |
//unset( $tabs['advanced'] ); | |
return $tabs; |
View forwardRef-anduseRef-2.jsx
This file contains 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
import { useRef } from 'react'; | |
import { Input } from './Input'; | |
const App = () => { | |
const inputRef = useRef(null); | |
const handleSubmit = (event) => { | |
event.preventDefault(); | |
const value = inputRef.current.getValue(); |
View forwardRef-anduseRef.jsx
This file contains 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
import { forwardRef, useRef } from 'react'; | |
const Input = forwardRef((props, ref) => { | |
const inputRef = useRef(null); | |
const getValue = () => { | |
return inputRef.current.value; | |
} | |
const isValid = () => { |
View rendering-array-map.js
This file contains 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
import React from "react"; | |
function EmployeeList(props) { | |
const employees = props.employees; | |
const employeeList = employees.map((employee) => ( | |
<div key={employee.id}> | |
<h2>{employee.name}</h2> | |
<p>Age: {employee.age}</p> | |
<p>Position: {employee.position}</p> |
View passing-array-as-prop.js
This file contains 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
import React from "react"; | |
import EmployeeList from "./EmployeeList"; | |
function App() { | |
const employees = [ | |
{ name: "John Doe", age: 25, position: "Software Engineer" }, | |
{ name: "Jane Smith", age: 32, position: "Product Manager" }, | |
{ name: "Mike Johnson", age: 27, position: "UI/UX Designer" }, | |
{ name: "Sarah Lee", age: 30, position: "Marketing Manager" }, | |
]; |
View passing-props.js
This file contains 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
import React from "react"; | |
function EmployeeList(props) { | |
const employees = props.employees; | |
const employeeList = employees.map((employee) => ( | |
<tr key={employee.name}> | |
<td>{employee.name}</td> | |
<td>{employee.age}</td> | |
<td>{employee.position}</td> |
View styling-array-list.css
This file contains 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
table { | |
border-collapse: collapse; | |
width: 100%; | |
margin: 0 auto; | |
font-family: Arial, sans-serif; | |
} | |
thead th { | |
background-color: #5f9ea0; | |
color: white; |
View render-employees-list.js
This file contains 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
import React from "react"; | |
import EmployeeList from "./EmployeeList"; | |
function App() { | |
const employees = [ | |
{ name: "John Doe", age: 25, position: "Software Engineer" }, | |
{ name: "Jane Smith", age: 32, position: "Product Manager" }, | |
{ name: "Mike Johnson", age: 27, position: "UI/UX Designer" }, | |
{ name: "Sarah Lee", age: 30, position: "Marketing Manager" }, | |
]; |
View mp-through-array-of-objects.js
This file contains 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
import React from "react"; | |
function EmployeeList() { | |
const employees = [ | |
{ name: "John Doe", age: 25, position: "Software Engineer" }, | |
{ name: "Jane Smith", age: 32, position: "Product Manager" }, | |
{ name: "Mike Johnson", age: 27, position: "UI/UX Designer" }, | |
{ name: "Sarah Lee", age: 30, position: "Marketing Manager" }, | |
]; |
NewerOlder