We have recently made updates to our system that change how products and their variants are managed. Here’s a breakdown of the changes:
- Each variant was treated as a separate product, with size being the only variant option.
| mutation { | |
| productCreate(input: { | |
| title: "Demo Product", | |
| descriptionHtml: "This is a demo product description.", | |
| productType: "Demo Product Type", | |
| vendor: "Demo Vendor", | |
| handle: "demo-product", | |
| published: true, | |
| options: [ | |
| { name: "Size", values: ["Small", "Medium", "Large"] }, |
| const Timezone = [ | |
| { value: "Pacific/Niue", label: "(GMT-11:00) Niue" }, | |
| { value: "Pacific/Pago_Pago", label: "(GMT-11:00) Pago Pago" }, | |
| { value: "Pacific/Honolulu", label: "(GMT-10:00) Hawaii Time" }, | |
| { value: "Pacific/Rarotonga", label: "(GMT-10:00) Rarotonga" }, | |
| { value: "Pacific/Tahiti", label: "(GMT-10:00) Tahiti" }, | |
| { value: "Pacific/Marquesas", label: "(GMT-09:30) Marquesas" }, | |
| { value: "America/Anchorage", label: "(GMT-09:00) Alaska Time" }, | |
| { value: "Pacific/Gambier", label: "(GMT-09:00) Gambier" }, | |
| { value: "America/Los_Angeles", label: "(GMT-08:00) Pacific Time" }, |
| /******/ (() => { // webpackBootstrap | |
| /******/ var __webpack_modules__ = ({ | |
| /***/ "./node_modules/@babel/runtime/regenerator/index.js": | |
| /*!**********************************************************!*\ | |
| !*** ./node_modules/@babel/runtime/regenerator/index.js ***! | |
| \**********************************************************/ | |
| /***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| module.exports = __webpack_require__(/*! regenerator-runtime */ "./node_modules/regenerator-runtime/runtime.js"); |
| Get Access token with client _id ------------ | |
| method get | |
| https://api.imgur.com/oauth2/authorize?client_id=Your_Client_ID&response_type=token&state=APPLICATION_STATE | |
| response get access token and refresh token | |
| https://imgur.com/?state=APPLICATION_STATE#access_token=ACCESS_TOKEN&expires_in=315360000&token_type=bearer&refresh_token=REFRESH_TOKEN&account_username=USERNAME&account_id=ACCOUNTID |
| import pluginify from 'pluginify'; | |
| class Plugin { | |
| constructor() { | |
| /* ... */ | |
| } | |
| } | |
| /* | |
| Convert plugin class into a jQuery plugin |
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: apurbapodder | |
| * Date: 11/9/20 | |
| * Time: 2:56 PM | |
| */ | |
| class BDS_License_For_PPU { |
| if (isset($_FILES['upload'])) { | |
| $target_path = __DIR__.'/upload/'; | |
| $tmp_name = $_FILES['upload']['tmp_name']; | |
| $filename = $_FILES['upload']['name']; | |
| $size = $_FILES['upload']['size']; | |
| $target_file = $target_path.$filename; | |
| //$num = isset($_POST['num'])?$_POST['num']:1; | |
| $num = $_POST['num']; | |
| uploadBigFile( $tmp_name, $num, $target_file, $_POST['size']); |
| public function do_job_report() | |
| { | |
| // First check the nonce, if it fails the function will break | |
| // check_ajax_referer( 'expert-report-nonce', '_wpnonce' ); | |
| $img_id = 0; | |
| $img_ids = []; | |
| if(is_uploaded_file($_FILES['report_image']['tmp_name'][0])): | |
| foreach($_FILES["report_image"]["tmp_name"] as $key=>$tmp_name) { | |
| $file_name=$_FILES["report_image"]["name"][$key]; | |
| if($key>0){ |
| var webpack = require('webpack'); | |
| const path = require('path'); | |
| const MiniCssExtractPlugin = require('mini-css-extract-plugin') | |
| const isDevelopment = process.env.NODE_ENV === 'development' | |
| module.exports = | |
| { | |
| "mode": "production", | |
| "entry": { | |
| "/assets/dist/js/admin/expert-jobs.js": "./assets/src/scripts/admin/expert-jobs.js", | |
| "/assets/dist/js/admin/expert-payments.js": "./assets/src/scripts/admin/expert-payments.js", |